public TcpService(IPublisher publisher, IPEndPoint serverEndPoint, IPublisher networkSendQueue, TcpServiceType serviceType, TcpSecurityType securityType, Func <Guid, IPEndPoint, ITcpDispatcher> dispatcherFactory, TimeSpan heartbeatInterval, TimeSpan heartbeatTimeout, IAuthenticationProvider authProvider, X509Certificate certificate, int connectionPendingSendBytesThreshold) { Ensure.NotNull(publisher, "publisher"); Ensure.NotNull(serverEndPoint, "serverEndPoint"); Ensure.NotNull(networkSendQueue, "networkSendQueue"); Ensure.NotNull(dispatcherFactory, "dispatcherFactory"); Ensure.NotNull(authProvider, "authProvider"); if (securityType == TcpSecurityType.Secure) { Ensure.NotNull(certificate, "certificate"); } _publisher = publisher; _serverEndPoint = serverEndPoint; _serverListener = new TcpServerListener(_serverEndPoint); _networkSendQueue = networkSendQueue; _serviceType = serviceType; _securityType = securityType; _dispatcherFactory = dispatcherFactory; _heartbeatInterval = heartbeatInterval; _heartbeatTimeout = heartbeatTimeout; _connectionPendingSendBytesThreshold = connectionPendingSendBytesThreshold; _authProvider = authProvider; _certificate = certificate; }
public TcpService(IPEndPoint serverEndPoint, X509Certificate certificate) { Ensure.NotNull(serverEndPoint, nameof(serverEndPoint)); _serverEndPoint = serverEndPoint; _serverListener = new TcpServerListener(_serverEndPoint); _certificate = certificate; _securityType = certificate == null ? TcpSecurityType.Normal : TcpSecurityType.Secure; }
public TcpService(IPublisher publisher, IPEndPoint serverEndPoint, IPublisher networkSendQueue, TcpServiceType serviceType, TcpSecurityType securityType, ITcpDispatcher dispatcher, TimeSpan heartbeatInterval, TimeSpan heartbeatTimeout, IAuthenticationProvider authProvider, X509Certificate certificate) : this(publisher, serverEndPoint, networkSendQueue, serviceType, securityType, (_, __) => dispatcher, heartbeatInterval, heartbeatTimeout, authProvider, certificate) { }
public TcpService(IPublisher publisher, IPEndPoint serverEndPoint, IPublisher networkSendQueue, TcpServiceType serviceType, TcpSecurityType securityType, ITcpDispatcher dispatcher, TimeSpan heartbeatInterval, TimeSpan heartbeatTimeout, IAuthenticationProvider authProvider, X509Certificate certificate, int connectionPendingSendBytesThreshold, int connectionQueueSizeThreshold) : this(publisher, serverEndPoint, networkSendQueue, serviceType, securityType, (_, __) => dispatcher, heartbeatInterval, heartbeatTimeout, authProvider, certificate, connectionPendingSendBytesThreshold, connectionQueueSizeThreshold) { }
public TcpService(IPublisher publisher, IPEndPoint serverEndPoint, IPublisher networkSendQueue, TcpServiceType serviceType, TcpSecurityType securityType, ITcpDispatcher dispatcher, TimeSpan heartbeatInterval, TimeSpan heartbeatTimeout, IAuthenticationProvider authProvider, AuthorizationGateway authorizationGateway, X509Certificate certificate, Func <X509Certificate, X509Chain, SslPolicyErrors, ValueTuple <bool, string> > sslClientCertValidator, int connectionPendingSendBytesThreshold, int connectionQueueSizeThreshold) : this(publisher, serverEndPoint, networkSendQueue, serviceType, securityType, (_, __) => dispatcher, heartbeatInterval, heartbeatTimeout, authProvider, authorizationGateway, certificate, sslClientCertValidator, connectionPendingSendBytesThreshold, connectionQueueSizeThreshold) { }
public TcpService(IPublisher publisher, IPEndPoint serverEndPoint, IPublisher networkSendQueue, TcpServiceType serviceType, TcpSecurityType securityType, Func <Guid, IPEndPoint, ITcpDispatcher> dispatcherFactory, TimeSpan heartbeatInterval, TimeSpan heartbeatTimeout, IAuthenticationProvider authProvider, AuthorizationGateway authorizationGateway, X509Certificate certificate, Func <X509Certificate, X509Chain, SslPolicyErrors, ValueTuple <bool, string> > sslClientCertValidator, int connectionPendingSendBytesThreshold, int connectionQueueSizeThreshold) { Ensure.NotNull(publisher, "publisher"); Ensure.NotNull(serverEndPoint, "serverEndPoint"); Ensure.NotNull(networkSendQueue, "networkSendQueue"); Ensure.NotNull(dispatcherFactory, "dispatcherFactory"); Ensure.NotNull(authProvider, "authProvider"); Ensure.NotNull(authorizationGateway, "authorizationGateway"); if (securityType == TcpSecurityType.Secure) { Ensure.NotNull(certificate, "certificate"); } _publisher = publisher; _serverEndPoint = serverEndPoint; _serverListener = new TcpServerListener(_serverEndPoint); _networkSendQueue = networkSendQueue; _serviceType = serviceType; _securityType = securityType; _dispatcherFactory = dispatcherFactory; _heartbeatInterval = heartbeatInterval; _heartbeatTimeout = heartbeatTimeout; _connectionPendingSendBytesThreshold = connectionPendingSendBytesThreshold; _connectionQueueSizeThreshold = connectionQueueSizeThreshold; _authProvider = authProvider; _authorizationGateway = authorizationGateway; _certificate = certificate; _sslClientCertValidator = sslClientCertValidator; }