예제 #1
0
 public override void Listen(int backlog)
 {
     // Accoring MSDN listen returns 0 if succeeded
     // and SOCKET_ERROR otherwise
     if (0 != UnsafeMethods.listen(Handle, backlog))
     {
         throw new SocketException();
     }
 }
예제 #2
0
파일: Socket.cs 프로젝트: songfj/AsyncIO
        public override void Listen(int backlog)
        {
            SocketError bindResult = (SocketError)UnsafeMethods.listen(Handle, backlog);

            if (bindResult != SocketError.Success)
            {
                throw new SocketException();
            }
        }