private function getStreamSocketClient()
    {
        $stream_socket_client = stream_socket_client(
            $this->params['endpoint'],
            $errno,
            $errstr,
            30,
            STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT,
            $this->getStreamContext()
        );

        if ($stream_socket_client === false) {
            throw new PushException('An error occurred while trying to contact APNS server.');
        }

        return $stream_socket_client;
    }
private function getStreamSocketClient()
    {
        $stream_socket_client = stream_socket_client(
            $this->params['endpoint'],
            $errno,
            $errstr,
            30,
            STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT,
            $this->getStreamContext()
        );

        if ($stream_socket_client === false) {
            throw new PushException('An error occurred while trying to contact APNS server.');
        }

        return $stream_socket_client;
    }
private function getStreamSocketClient ( ) { $ stream_socket_client = stream_socket_client ( $ this -> params [ 'endpoint' ] , $ errno , $ errstr , 30 , STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT , $ this -> getStreamContext ( ) ) ; if ( $ stream_socket_client === false ) { throw new PushException ( 'An error occurred while trying to contact APNS server.' ) ; } return $ stream_socket_client ; }
Get the Stream socket client.

Connect to the APNS server and open a client socket to it.

@return resource Socket to the APNS server.

@throws PushException if connection to APNS server failed.
Get the Stream socket client .