public TcpClientConnector() { _connectSocketArgsPool = new SocketArgsPool("TcpClientConnector._connectSocketArgsPool", TcpConfiguration.ConnectPoolSize, CreateConnectSocketArgs); _pendingConections = new ConcurrentDictionary<Guid, PendingConnection>(); _timer = new Timer(TimerCallback, null, CheckPeriodMs, Timeout.Infinite); }
public TcpClientConnector() { _connectSocketArgsPool = new SocketArgsPool("TcpClientConnector._connectSocketArgsPool", TcpConfiguration.ConnectPoolSize, CreateConnectSocketArgs); _pendingConections = new ConcurrentDictionary <Guid, PendingConnection>(); _timer = new Timer(TimerCallback, null, CheckPeriodMs, Timeout.Infinite); }
public TcpServerListener(IPEndPoint serverEndPoint) { _serverEndPoint = serverEndPoint; _listeningSocket = new Socket(_serverEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); _acceptSocketArgsPool = new SocketArgsPool("TcpServerListener.AcceptSocketArgsPool", ConcurrentAccepts*2, CreateAcceptSocketArgs); }
public TcpServerListener(IPEndPoint serverEndPoint) { _serverEndPoint = serverEndPoint; _listeningSocket = new Socket(_serverEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); _acceptSocketArgsPool = new SocketArgsPool("TcpServerListener.AcceptSocketArgsPool", ConcurrentAccepts * 2, CreateAcceptSocketArgs); }
static TcpConnection() { BufferManager = new BufferManager(TcpConfiguration.BufferChunksCount, TcpConfiguration.SocketBufferSize); SocketArgsPool = new SocketArgsPool("TcpConnection.SocketArgsPool", TcpConfiguration.SendReceivePoolSize, () => new SocketAsyncEventArgs()); }