public TcpServerConnection( TcpConnectionEndPoint connectionEndPoint) : base((connectionEndPoint?.ConnectionSettings?.EnableMessageFraming).GetValueOrDefault(true), connectionEndPoint?.ConnectionSettings ?? new ServerConnectionSettings()) { _serverConnectionSettings = (ServerConnectionSettings)_connectionSettings; _localEndPoint = connectionEndPoint.LocalEndPoint ?? throw new ArgumentNullException("connectionEndPoint.LocalEndPoint"); }
public TcpClientConnection( TcpConnectionEndPoint connectionEndPoint) : base((connectionEndPoint?.ConnectionSettings?.EnableMessageFraming).GetValueOrDefault(true), connectionEndPoint?.ConnectionSettings ?? new ClientConnectionSettings()) { _clientConnectionSettings = (ClientConnectionSettings)_connectionSettings; _remoteEndPoint = connectionEndPoint.RemoteEndPoint ?? throw new ArgumentNullException(nameof(connectionEndPoint.RemoteEndPoint)); _localEndPoint = connectionEndPoint.LocalEndPoint; }
private static IConnection CreateSslServer(TcpConnectionEndPoint endPoint) => ServiceRef.Create <IConnection>(new SslTcpServerConnection(endPoint));
private static IConnection CreateSslClient(TcpConnectionEndPoint endPoint) => ServiceRef.Create <IConnection>(new SslTcpClientConnection(endPoint));
private static IConnection CreateServer(TcpConnectionEndPoint connectionEndPoint) => ServiceRef.Create <IConnection>(new TcpServerConnection(connectionEndPoint));