public TcpClientRouterFactory(string tcpClient, int runtimeTimeoutMs, ILogger logger) { _logger = logger; _tcpClientAddress = IpcTcpSocketEndPoint.NormalizeTcpIpEndPoint(string.IsNullOrEmpty(tcpClient) ? "127.0.0.1:" + string.Format("{0}", 56000 + (Process.GetCurrentProcess().Id % 1000)) : tcpClient); _auto_shutdown = runtimeTimeoutMs != Timeout.Infinite; if (runtimeTimeoutMs != Timeout.Infinite) { TcpClientTimeoutMs = runtimeTimeoutMs; } }
protected TcpServerRouterFactory(string tcpServer, int runtimeTimeoutMs, ILogger logger) : base(logger) { _tcpServerAddress = IpcTcpSocketEndPoint.NormalizeTcpIpEndPoint(string.IsNullOrEmpty(tcpServer) ? "127.0.0.1:0" : tcpServer); _auto_shutdown = runtimeTimeoutMs != Timeout.Infinite; if (runtimeTimeoutMs != Timeout.Infinite) { RuntimeTimeoutMs = runtimeTimeoutMs; } _tcpServer = new ReversedDiagnosticsServer(_tcpServerAddress, enableTcpIpProtocol: true); _tcpServerEndpointInfo = new IpcEndpointInfo(); }