Ejemplo n.º 1
0
        public void TransmitsProtocolHeader()
        {
            _context.Send(_subject, (Connect, new IPEndPoint(IPAddress.Loopback, _port)));

            var socket = _listener.AcceptSocket();
            var buffer = new Byte[8];

            socket.Receive(buffer, 0, buffer.Length, SocketFlags.None);
            ProtocolHeader.Deserialize(buffer, out var result, out var _);

            Assert.Equal(expected: ProtocolHeader.Default, actual: result);
        }