public function connect($socket) { // get the connected client's ip $client_ip = NULL; socket_getpeername($socket, $client_ip); // add player to container $this->players->addPlayer($client_ip, $socket); parent::connect($socket); $this->say('with ' . $client_ip); }