static async void HandleClient(int serverPort) { client = new FramedClient( new SocketClient()); client.Received += bs => { Console.WriteLine("Received: " + encoding.GetString(bs.Array, bs.Offset, bs.Count)); }; await client.Connect(new IPEndPoint(IPAddress.Loopback, serverPort)); client.SendPacket(encoding.GetBytes("Steve")); }
static async void HandleClient(int serverPort) { client = new FramedClient( new SocketClient()); client.Received.Subscribe(bs => { Console.WriteLine("Received: " + encoding.GetString(bs.Array, bs.Offset, bs.Count)); }); await client.Connect(new IPEndPoint(IPAddress.Loopback, serverPort)); client.SendPacket(encoding.GetBytes("Steve")); }
public IObservable <Unit> Connect(IPEndPoint endPoint) { framedClient.Connect(endPoint); return(handshakeCompleted.AsObservable()); }
public IObservable <Unit> Connect(IPEndPoint endPoint) { return(framedClient.Connect(endPoint)); }