public function setOption($level, $optname, $val)
    {
        if (is_resource($this->fd)) {
            socket_set_option($this->fd, $level, $optname, $val);
        } else {
            \EventUtil::setSocketOption($this->fd, $level, $optname, $val);
        }
    }