public static TcpTransportFactory CreateServer(int port) { var configuration = new TcpTransportConfiguration( new IPEndPoint(IPAddress.Any, port), TcpRole.Server); return(new TcpTransportFactory(configuration)); }
public static TcpTransportFactory CreateClient(IPAddress address, int port, TcpTransportHandshakeCompletionHandler handshakeCompletionHandler = null) { var configuration = new TcpTransportConfiguration( new IPEndPoint(address, port), TcpRole.Client); if (handshakeCompletionHandler != null) { configuration.HandshakeCompleted += handshakeCompletionHandler; } return new TcpTransportFactory(configuration); }
public static TcpTransportFactory CreateClient(IPAddress address, int port, TcpTransportHandshakeCompletionHandler handshakeCompletionHandler = null) { var configuration = new TcpTransportConfiguration( new IPEndPoint(address, port), TcpRole.Client); if (handshakeCompletionHandler != null) { configuration.HandshakeCompleted += handshakeCompletionHandler; } return(new TcpTransportFactory(configuration)); }
public TcpTransportFactory(TcpTransportConfiguration configuration) { this.configuration = configuration; }
public static TcpTransportFactory CreateServer(int port) { var configuration = new TcpTransportConfiguration( new IPEndPoint(IPAddress.Any, port), TcpRole.Server); return new TcpTransportFactory(configuration); }