diff --git a/app/Classes/Protocol.php b/app/Classes/Protocol.php index f683fc5..1574497 100644 --- a/app/Classes/Protocol.php +++ b/app/Classes/Protocol.php @@ -168,6 +168,10 @@ abstract class Protocol $this->comms[$key] = $value; break; + case 'client': + $this->{$key} = $value; + break; + default: throw new \Exception('Unknown key: '.$key); } @@ -359,7 +363,7 @@ abstract class Protocol // We are an IP node $this->optionSet(self::O_TCP); - $this->setClient($client); + $this->client = $client; switch ($mo->name) { case 'EMSI': @@ -484,15 +488,4 @@ abstract class Protocol { $this->session |= $key; } - - /** - * Set our client that we are communicating with - * - * @param SocketClient $client - * @deprecated use __get()/__set() - */ - protected function setClient(SocketClient $client): void - { - $this->client = $client; - } } \ No newline at end of file diff --git a/app/Classes/Protocol/DNS.php b/app/Classes/Protocol/DNS.php index 6acb9f1..cd18ea9 100644 --- a/app/Classes/Protocol/DNS.php +++ b/app/Classes/Protocol/DNS.php @@ -71,7 +71,7 @@ final class DNS extends BaseProtocol if (! parent::onConnect($client)) { Log::withContext(['pid'=>getmypid()]); - $this->setClient($client); + $this->client = $client; $this->protocol_session(); Log::info(sprintf('%s:= onConnect - Connection closed [%s]',self::LOGKEY,$client->address_remote));