public function getOption($level, $optname)
    {
        $value = @socket_get_option($this->resource, $level, $optname);
        if ($value === false) {
            throw Exception::createFromSocketResource($this->resource);
        }
        return $value;
    }