예제 #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);
        }