public function accept()
    {
        $new = stream_socket_accept(
            $this->socket,
            $this->options['timeout_accept']
        );

        if (!$new) {
            throw new ConnectionException(socket_strerror(socket_last_error($new)));
        }
        
        socket_set_option(socket_import_stream($new), SOL_TCP, TCP_NODELAY, 1);

        return $new;
    }
public function accept()
    {
        $new = stream_socket_accept(
            $this->socket,
            $this->options['timeout_accept']
        );

        if (!$new) {
            throw new ConnectionException(socket_strerror(socket_last_error($new)));
        }
        
        socket_set_option(socket_import_stream($new), SOL_TCP, TCP_NODELAY, 1);

        return $new;
    }
public function accept ( ) { $ new = stream_socket_accept ( $ this -> socket , $ this -> options [ 'timeout_accept' ] ) ; if ( ! $ new ) { throw new ConnectionException ( socket_strerror ( socket_last_error ( $ new ) ) ) ; } socket_set_option ( socket_import_stream ( $ new ) , SOL_TCP , TCP_NODELAY , 1 ) ; return $ new ; }
Accepts a new connection on the socket

@throws ConnectionException
@return resource
Accepts a new connection on the socket