public function getOptions()
    {
        if($resource = $this->getResource())
        {
            $options = stream_context_get_options($resource);

            if(!empty($options))
            {
                $name = key($options);
                $result = $options[$name];
            }
            else $result = array();

            return $result;
        }

        return $this->_options;
    }