connect() public method

public connect ( $socket )
Example #1
0
 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);
 }