Exemplo n.º 1
0
 public void Write(BitcoinStreamWriter writer)
 {
     writer.WriteText(rejectedCommand);
     writer.Write((byte) reason);
     writer.WriteText(reasonText);
     if (data != null)
     {
         writer.Write(data);
     }
 }
        public void Write(BitcoinStreamWriter writer)
        {
            writer.Write(protocolVersion);
            writer.Write(services);
            writer.Write(timestamp);

            writer.Write(remoteServices);
            writer.WriteAddress(remoteEndpoint.Address);
            writer.WriteBigEndian((ushort) remoteEndpoint.Port);

            writer.Write(localServices);
            writer.WriteAddress(localEndpoint.Address);
            writer.WriteBigEndian((ushort) localEndpoint.Port);

            writer.Write(nonce);

            writer.WriteText(UserAgent);
            writer.Write(startHeight);
            writer.Write(acceptBroadcasts);
        }