private function composeStreamSocket()
    {
        $ctx = stream_context_create();

        //Already checked if certificate exists.
        $certificate = $this->config['certificate'];
        stream_context_set_option($ctx, 'ssl', 'local_cert', $certificate);

        if (isset($this->config['passPhrase'])) {
            $passPhrase = $this->config['passPhrase'];
            if (!empty($passPhrase)) {
                stream_context_set_option($ctx, 'ssl', 'passphrase', $passPhrase);
            }
        }

        if (isset($this->config['passFile'])) {
            $passFile = $this->config['passFile'];
            if (file_exists($passFile)) {
                stream_context_set_option($ctx, 'ssl', 'local_pk', $passFile);
            }
        }

        return $ctx;
    }
private function composeStreamSocket()
    {
        $ctx = stream_context_create();

        //Already checked if certificate exists.
        $certificate = $this->config['certificate'];
        stream_context_set_option($ctx, 'ssl', 'local_cert', $certificate);

        if (isset($this->config['passPhrase'])) {
            $passPhrase = $this->config['passPhrase'];
            if (!empty($passPhrase)) {
                stream_context_set_option($ctx, 'ssl', 'passphrase', $passPhrase);
            }
        }

        if (isset($this->config['passFile'])) {
            $passFile = $this->config['passFile'];
            if (file_exists($passFile)) {
                stream_context_set_option($ctx, 'ssl', 'local_pk', $passFile);
            }
        }

        return $ctx;
    }
private function composeStreamSocket ( ) { $ ctx = stream_context_create ( ) ; //Already checked if certificate exists. $ certificate = $ this -> config [ 'certificate' ] ; stream_context_set_option ( $ ctx , 'ssl' , 'local_cert' , $ certificate ) ; if ( isset ( $ this -> config [ 'passPhrase' ] ) ) { $ passPhrase = $ this -> config [ 'passPhrase' ] ; if ( ! empty ( $ passPhrase ) ) { stream_context_set_option ( $ ctx , 'ssl' , 'passphrase' , $ passPhrase ) ; } } if ( isset ( $ this -> config [ 'passFile' ] ) ) { $ passFile = $ this -> config [ 'passFile' ] ; if ( file_exists ( $ passFile ) ) { stream_context_set_option ( $ ctx , 'ssl' , 'local_pk' , $ passFile ) ; } } return $ ctx ; }
Compose the stream socket

@return resource
Compose the stream socket