Ejemplo n.º 1
0
        public Wire.Network.Addr ToWire()
        {
            byte[] ipPadded = new byte[8];
            byte[] ipBytes  = EndPoint.Address.GetAddressBytes();
            Array.Copy(ipBytes, ipPadded, ipBytes.Length);

            return(new Wire.Network.Addr
            {
                Ip = BinaryHelpers.UnpackUInt64(ipPadded),
                Port = (ushort)EndPoint.Port
            });
        }