protected function getStreamContext($listen = false)
    {
        $options = [];

        if ($this->scheme == Protocol::SCHEME_UNDERLYING_SECURE
            || $this->scheme == Protocol::SCHEME_UNDERLYING
        ) {
            $options['socket'] = $this->getSocketStreamContextOptions();
        }

        if ($this->scheme == Protocol::SCHEME_UNDERLYING_SECURE) {
            $options['ssl'] = $this->getSslStreamContextOptions();
        }

        return stream_context_create(
            $options,
            []
        );
    }
protected function getStreamContext($listen = false)
    {
        $options = [];

        if ($this->scheme == Protocol::SCHEME_UNDERLYING_SECURE
            || $this->scheme == Protocol::SCHEME_UNDERLYING
        ) {
            $options['socket'] = $this->getSocketStreamContextOptions();
        }

        if ($this->scheme == Protocol::SCHEME_UNDERLYING_SECURE) {
            $options['ssl'] = $this->getSslStreamContextOptions();
        }

        return stream_context_create(
            $options,
            []
        );
    }
protected function getStreamContext ( $ listen = false ) { $ options = [ ] ; if ( $ this -> scheme == Protocol :: SCHEME_UNDERLYING_SECURE || $ this -> scheme == Protocol :: SCHEME_UNDERLYING ) { $ options [ 'socket' ] = $ this -> getSocketStreamContextOptions ( ) ; } if ( $ this -> scheme == Protocol :: SCHEME_UNDERLYING_SECURE ) { $ options [ 'ssl' ] = $ this -> getSslStreamContextOptions ( ) ; } return stream_context_create ( $ options , [ ] ) ; }
Gets a stream context

@return resource
Gets a stream context