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(); } }
public override void Listen(int backlog) { SocketError bindResult = (SocketError)UnsafeMethods.listen(Handle, backlog); if (bindResult != SocketError.Success) { throw new SocketException(); } }