public TcpClientPool(ITcpClientFactory factory) { Factory = factory; #if SUPPORTS_NLOG _logger.Trace("Created TcpClientPool"); #endif }
public Client(ITcpClientFactory tcpClientFactory, SocksAddress address, SocksAddress destinationAddress, bool useSsl) { _destinationAddress = destinationAddress; _useSsl = useSsl; _tcpClientFactory = tcpClientFactory; _address = address; }
public TaskController(ITaskService taskservice, ILineService lineService, ITcpClientFactory tcpClientFactory, ITerminalService terminalService) { this.currentservice = taskservice; this.lineService = lineService; this.tcpClientFactory = tcpClientFactory; this.terminalService = terminalService; }
public SendJt808MessageController(ITcpClientFactory tcpClientFactory, ITcpClientManager tcpClientManager, ITerminalService terminalService, ILogger <SendJt808MessageController> logger) { this.tcpClientFactory = tcpClientFactory; this.tcpClientManager = tcpClientManager; this.terminalService = terminalService; this.logger = logger; }
public TcpServer(ILogger logger, ITcpClientFactory tcpClientFactory) { this.logger = logger; this.tcpClientFactory = tcpClientFactory; cancellationTokenSource = new CancellationTokenSource(); }
/// <summary> /// Initializes a new instance of the <see cref="T:System.Object" /> class. /// </summary> public TcpMessageListener(ITcpClientFactory tcpClientFactory, IMessageDeserializerFactory messageDeserializerFactory, MessageEventDispatcher messageDispatcher) { _tcpClientFactory = tcpClientFactory; _messageDeserializerFactory = messageDeserializerFactory; _messageDispatcher = messageDispatcher; _clientThread = new Thread(ClientThread) {IsBackground = true}; }
/// <summary> /// Initializes a new instance of the Connection class. /// </summary> internal Connection(ITcpClientFactory tcpClientFactory) { ConnectTimeout = DefaultTimeoutLength; _tcpClientFactory = tcpClientFactory; _lockedStream = new LockedResource <INetworkStream>(); _tcpClient = CreateClient(); _internalBuffer = new byte[InternalBufferSize]; _readBuffer = new StringBuilder(); }
/// <summary> /// Initializes a new instance of the Connection class. /// </summary> internal Connection(ITcpClientFactory tcpClientFactory) { ConnectTimeout = DefaultTimeoutLength; _tcpClientFactory = tcpClientFactory; _tcpClient = CreateClient(); _internalBuffer = new byte[InternalBufferSize]; _readBuffer = new StringBuilder(); _timer = new Timer(DefaultSocketTimerLength); _timer.Elapsed += SocketTimerElapsed; _timer.AutoReset = false; }
public TcpProxy(ILogger <TcpProxy> logger, ReverseProxyConfiguration configuration, ITcpClientFactory tcpClientFactory) { _logger = logger; _configuration = configuration; _tcpClientFactory = tcpClientFactory; var serializer = new Serializer(new[] { typeof(FailcPacket) }); var packetString = serializer.Serialize(new FailcPacket { Type = LoginFailType.Maintenance }); _packet = Encoding.Default.GetBytes($"{packetString} "); for (var i = 0; i < packetString.Length; i++) { _packet[i] = Convert.ToByte(_packet[i] + 15); } _packet[^ 1] = 25;
public Socks5HttpClientFactory(ITcpClientFactory tcpClientFactory) { _pool = new Pooling.TcpClientPool(tcpClientFactory); _tcpClientFactory = tcpClientFactory; }
/// <summary> /// Initializes a new instance of the Connection class. /// </summary> internal Connection(ITcpClientFactory tcpClientFactory) { ConnectTimeout = DefaultTimeoutLength; _tcpClientFactory = tcpClientFactory; _tcpClient = CreateClient(); _internalBuffer = new byte[InternalBufferSize]; _readBuffer = new StringBuilder(); _timer = new Timer(DefaultSocketTimerLength); _timer.Elapsed += SocketTimerElapsed; }
/// <summary> /// Initializes a new instance of the MessageCache class. /// </summary> internal MessageCache(ITcpClientFactory tcpClientFactory) : base(tcpClientFactory) { //_readBuffer = new StringBuilder(); _messages = new Dictionary <string, JsonMessage>(); }
/// <summary> /// Initializes a new instance of the MessageCache class. /// </summary> internal MessageCache(ITcpClientFactory tcpClientFactory) : base(tcpClientFactory) { //_readBuffer = new StringBuilder(); _messages = new Dictionary<string, JsonMessage>(); }
/// <summary> /// Initializes a new instance of the Connection class. /// </summary> internal Connection(ITcpClientFactory tcpClientFactory) { ConnectTimeout = DefaultTimeoutLength; _tcpClientFactory = tcpClientFactory; _lockedStream = new LockedResource<INetworkStream>(); _tcpClient = CreateClient(); _internalBuffer = new byte[InternalBufferSize]; _readBuffer = new StringBuilder(); }
public TcpClientWrapperMessageHandler(ITcpClientFactory factory) : this(new Pooling.TcpClientPool(factory)) { }
public TcpClientWrapper(SocksAddress destinationAddress, bool useSsl, ITcpClientFactory factory) { _destinationAddress = destinationAddress; _useSsl = useSsl; _factory = factory; }
/// <summary> /// Initializes a new instance of the FahClient class. /// </summary> internal FahClient(ITcpClientFactory tcpClientFactory) : base(tcpClientFactory) { }
public HttpSocks4MessageHandler(ITcpClientFactory tcpClientFactory, ISocksWebProxy proxy) { _pool = new Pooling.TcpClientPool(tcpClientFactory); Proxy = proxy; }
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.IpAdress); }); }