public void CheckConnectivity() { var port = GetFreePort(); var server = new AsyncRpc.Transport.Tcp.TcpHost(new Handler()); server.StartListening(new IPEndPoint(IPAddress.Loopback, port)); var client = new AsyncRpc.Transport.Tcp.TcpClientTransport("127.0.0.1", port); var message = new byte[] {1, 2, 3, 4, 5}; var task = client.SendMessageAsync(message); task.Wait(); Assert.True(task.Result.SequenceEqual(message)); }
public void CheckConnectivity() { var port = GetFreePort(); var server = new AsyncRpc.Transport.Tcp.TcpHost(new Handler()); server.StartListening(new IPEndPoint(IPAddress.Loopback, port)); var client = new AsyncRpc.Transport.Tcp.TcpClientTransport("127.0.0.1", port); var message = new byte[] { 1, 2, 3, 4, 5 }; var task = client.SendMessageAsync(message); task.Wait(); Assert.True(task.Result.SequenceEqual(message)); }