public ITcpConnection ConnectTo(Guid connectionId, IPEndPoint localEndPoint, IPEndPoint remoteEndPoint, Action <ITcpConnection> onConnectionEstablished = null, Action <ITcpConnection, SocketError> onConnectionFailed = null) { Ensure.NotNull(remoteEndPoint, "remoteEndPoint"); return(TcpConnection.CreateConnectingTcpConnection(connectionId, localEndPoint, remoteEndPoint, this, onConnectionEstablished, onConnectionFailed)); }
public ITcpConnection ConnectTo(Guid connectionId, IPEndPoint remoteEndPoint, TimeSpan connectionTimeout, Action <ITcpConnection> onConnectionEstablished = null, Action <ITcpConnection, SocketError> onConnectionFailed = null, bool verbose = true) { Ensure.NotNull(remoteEndPoint, "remoteEndPoint"); return(TcpConnection.CreateConnectingTcpConnection(connectionId, remoteEndPoint, this, connectionTimeout, onConnectionEstablished, onConnectionFailed, verbose)); }