Exemplo n.º 1
0
        public void Usage()
        {
            var hostProtocolAddressInformation =
                new HostProtocolAddressInformation(1, new IPEndPoint(IPAddress.Parse("192.168.178.44"), 5678));

            var bytes = hostProtocolAddressInformation.GetBytes();

            bytes.Should().BeEquivalentTo(new byte[] { 0x08, 0x01, 0xC0, 0xA8, 0xB2, 0x2c, 0x16, 0x2E });
        }
Exemplo n.º 2
0
 public ConnectResponse(byte headerLength, byte protocolVersion, ushort totalLength, byte communicationChannel,
                        byte status, HostProtocolAddressInformation dataEndpoint, ConnectionResponseDataBlock connectionResponseDataBlock)
 {
     HeaderLength         = headerLength;
     ProtocolVersion      = protocolVersion;
     TotalLength          = totalLength;
     CommunicationChannel = communicationChannel;
     Status       = status;
     DataEndpoint = dataEndpoint;
     ConnectionResponseDataBlock = connectionResponseDataBlock;
 }