public TcpClientHandler(ILogger <TcpClientHandler> logger, ITcpClientManager tcpClientManager, IServerSessionManager serverSessionManager, IOptions <GatewayConfiguration> options) { this.logger = logger; this.tcpClientManager = tcpClientManager; this.serverSessionManager = serverSessionManager; configuration = options.Value; }
public BranchTcpServerHandler(ILogger <BranchTcpServerHandler> logger, IServerSessionManager serverSessionManager, ITcpClientFactory tcpClientFactory, ITcpClientManager tcpClientManager, IOptions <GatewayConfiguration> options) { this.logger = logger; this.tcpClientManager = tcpClientManager; this.serverSessionManager = serverSessionManager; configuration = options.Value; Parallel.ForEach(configuration.BrabchServer, x => tcpClientFactory.CreateTcpClient(x.MatchId)); }