Пример #1
0
        public BasicSocketServer(IPEndPoint serverEndPoint)
        {
            _serverEndPoint  = serverEndPoint;
            _listeningSocket = new Socket(_serverEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);

            _acceptSocketArgsPool = new SocketArgsPool("TcpServerListener.AcceptSocketArgsPool",
                                                       ConcurrentAccepts * 2,
                                                       CreateAcceptSocketArgs);
        }
Пример #2
0
        public BasicSocketServer(IPEndPoint serverEndPoint)
        {
            _serverEndPoint = serverEndPoint;
            _listeningSocket = new Socket(_serverEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);

            _acceptSocketArgsPool = new SocketArgsPool("TcpServerListener.AcceptSocketArgsPool",
                ConcurrentAccepts*2,
                CreateAcceptSocketArgs);
        }