Otp.OtpOutputStream.write_tuple_head C# (CSharp) Method

write_tuple_head() public method

public write_tuple_head ( int arity ) : void
arity int
return void
        public virtual void  write_tuple_head(int arity)
        {
            if (arity < 0xff)
            {
                this.write1(OtpExternal.smallTupleTag);
                this.write1(arity);
            }
            else
            {
                this.write1(OtpExternal.largeTupleTag);
                this.write4BE(arity);
            }
        }
        

Usage Example

コード例 #1
0
 private void  sendExit(int tag, Erlang.Pid from, Erlang.Pid dest, System.String reason)
 {
     if (!connected)
     {
         throw new System.IO.IOException("Not connected");
     }
     OtpOutputStream header = new OtpOutputStream(headerLen);
     
     // preamble: 4 byte length + "passthrough" tag
     header.write4BE(0); // reserve space for length
     header.write1(passThrough);
     header.write1(version);
     
     // header
     header.write_tuple_head(4);
     header.write_long(tag);
     header.write_any(from);
     header.write_any(dest);
     header.write_string(reason);
     
     // fix up length in preamble
     header.poke4BE(0, header.count() - 4);
     
     do_send(header);
 }
All Usage Examples Of Otp.OtpOutputStream::write_tuple_head