/** * Disconnect * * @return void * @throws \NetDeviceLib\Net\Error\SocketException */ protected function _disconnect() { foreach ($this->config('commands.onDisconnect') as $cmd) { $this->_socket->write($cmd . $this->config('eol')); } $this->_socket->disconnect(); }