public static function createListen($port, $backlog = 128)
    {
        $return = @socket_create_listen($port, $backlog);

        if ($return === false) {
            throw new SocketException();
        }

        $socket = new self($return);
        $socket->domain = AF_INET;

        return $socket;
    }
public static function createListen($port, $backlog = 128)
    {
        $return = @socket_create_listen($port, $backlog);

        if ($return === false) {
            throw new SocketException();
        }

        $socket = new self($return);
        $socket->domain = AF_INET;

        return $socket;
    }
public static function createListen ( $ port , $ backlog = 128 ) { $ return = @ socket_create_listen ( $ port , $ backlog ) ; if ( $ return === false ) { throw new SocketException ( ) ; } $ socket = new self ( $ return ) ; $ socket -> domain = AF_INET ; return $ socket ; }
Opens a socket on port to accept connections.

<p>Creates a new socket resource of type <code>AF_INET</code> listening on all local interfaces on the given
port waiting for new connections.</p>

@param int $port    The port on which to listen on all interfaces.
@param int $backlog <p>The backlog parameter defines the maximum length the queue of pending connections may
grow to. <code>SOMAXCONN</code> may be passed as the backlog parameter.</p>

@throws Exception\SocketException If the socket is not successfully created.

@see Socket::create()
@see Socket::bind()
@see Socket::listen()

@return Socket Returns a Socket object based on the successful creation of the php socket.
Opens a socket on port to accept connections .