public function send(RCONPacket $dataPacket) { if (empty($this->socket)) { $this->socket = new TCPSocket(); $this->socket->connect($this->ipAddress, $this->portNumber); } $this->socket->send($dataPacket->__toString()); }