private KestrelClient CreateClient() { WrappedSocket socket = GetSocket(); var protocol = new KestrelProtocol(socket); var client = new KestrelClient(protocol); client.Connect(); return client; }
private void SetupClient() { if (client != null) client.Disconnect(); var socket = GetSocket(); socket.Connect(); protocol = new KestrelProtocol(socket); client = new KestrelClient(protocol); }
protected KestrelClient CreateServer(IPEndPoint endpoint) { var socket = new WrappedSocket(endpoint, _configuration.SendReceiveTimeout); var protocol = new KestrelProtocol(socket); var server = new KestrelClient(protocol); return server; }