"){ // make sure they're not first requesting access policy
// Strip whitespaces and write back to user
// Respond to commands
//$output = ereg_replace("[ \t\n\r]","",$input).chr(0);
//socket_write($client[$i]['sock'],$input);
rLog('Client #'.$i.': '.$input);
// this sends to the same person that wrote it
//socket_write($client[$i]['sock'], "$input".chr(0));
// send this message to all clients
for($v=0; $v"){
rLog("Client #".$i." requested a policy file...");
$cdmp="";
socket_write($client[$i]['sock'],$cdmp.chr(0));
rLog("Client #".$i." received policy file.");
socket_close($client[$i]['sock']);
unset($client[$i]);
$cdmp="";
}
}
}else{
/* disconnects previous user when new one connects... no clue why to use this...
if($client[$i]['sock']!=null){
// Close the socket
socket_close($client[$i]['sock']);
unset($client[$i]);
rLog("Disconnected(1) client #".$i);
}*/
}
}
}
// Close the master sockets
socket_close($sock);
?>