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 static CourierBuilder UseTcpClientTransport(this CourierBuilder builder, IPAddress address, int port, TcpTransportHandshakeCompletionHandler handshakeCompletionHandler) { return(builder.UseTransport(TcpTransportFactory.CreateClient(address, port, handshakeCompletionHandler))); }
public static CourierBuilder UseTcpClientTransport(this CourierBuilder builder, IPAddress address, int port, TcpTransportHandshakeCompletionHandler handshakeCompletionHandler) { return builder.UseTransport(TcpTransportFactory.CreateClient(address, port, handshakeCompletionHandler)); }