/** * Connect to Kafka via socket * * @return void */ public function connect() { if (null === $this->socket) { $this->socket = new Socket($this->host, $this->port, $this->recvTimeoutSec, $this->recvTimeoutUsec, $this->sendTimeoutSec, $this->sendTimeoutUsec); } $this->socket->connect(); }