public function assertAlive()
    {
        $code = $this->getOption(SOL_SOCKET, SO_ERROR);
        if ($code !== 0) {
            throw Exception::createFromCode($code, 'Socket error');
        }
        return $this;
    }