Otp.OtpOutputStream.write4BE C# (CSharp) Méthode

write4BE() public méthode

public write4BE ( long n ) : void
n long
Résultat void
        public virtual void  write4BE(long n)
        {
            write((byte) ((n & 0xff000000) >> 24));
            write((byte) ((n & 0xff0000) >> 16));
            write((byte) ((n & 0xff00) >> 8));
            write((byte) (n & 0xff));
        }
        

Usage Example

 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::write4BE