protected function connectUdp(): void
    {
        if (!extension_loaded('sockets')) {
            throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler');
        }

        $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0);
        if (!$this->udpConnection) {
            throw new \LogicException('Unable to create a socket');
        }

        if (!socket_connect($this->udpConnection, $this->host, $this->port)) {
            throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port);
        }
    }
protected function connectUdp(): void
    {
        if (!extension_loaded('sockets')) {
            throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler');
        }

        $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0);
        if (!$this->udpConnection) {
            throw new \LogicException('Unable to create a socket');
        }

        if (!socket_connect($this->udpConnection, $this->host, $this->port)) {
            throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port);
        }
    }
protected function connectUdp ( ) : void { if ( ! extension_loaded ( 'sockets' ) ) { throw new MissingExtensionException ( 'The sockets extension is required to use udp URLs with the CubeHandler' ) ; } $ this -> udpConnection = socket_create ( AF_INET , SOCK_DGRAM , 0 ) ; if ( ! $ this -> udpConnection ) { throw new \ LogicException ( 'Unable to create a socket' ) ; } if ( ! socket_connect ( $ this -> udpConnection , $ this -> host , $ this -> port ) ) { throw new \ LogicException ( 'Unable to connect to the socket at ' . $ this -> host . ':' . $ this -> port ) ; } }
Establish a connection to an UDP socket

@throws \LogicException           when unable to connect to the socket
@throws MissingExtensionException when there is no socket extension
Establish a connection to an UDP socket