Exemplo n.º 1
0
 public static byte[] EncodeNetworkAddressKey(NetworkAddressKey networkAddressKey)
 {
     using (var stream = new MemoryStream())
     using (var writer = new BinaryWriter(stream))
     {
         EncodeNetworkAddressKey(writer, networkAddressKey);
         return stream.ToArray();
     }
 }
Exemplo n.º 2
0
 public static void EncodeNetworkAddressKey(BinaryWriter writer, NetworkAddressKey networkAddressKey)
 {
     writer.WriteVarBytes(networkAddressKey.IPv6Address.ToArray());
     writer.Write(networkAddressKey.Port);
 }