TickLoop thread

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-10 17:10:15 +01:00
parent d5d319fb7c
commit eebbc263b0
4 changed files with 58 additions and 7 deletions

View file

@ -27,10 +27,9 @@ the Free Software Foundation, either version 3 of the License, or
class UDPSocket{
class UDPSocket extends Thread{
private $encrypt;
var $buffer, $connected, $errors, $sock, $server;
function __construct($server, $port, $listen = false, $socket = false){
$this->errors = array_fill(88,(125 - 88) + 1, true);
$this->server = $server;
@ -57,8 +56,12 @@ class UDPSocket{
}
}
}
public function run(){
}
function listenSocket(){
public function listenSocket(){
$sock = @socket_accept($this->sock);
if($sock !== false){
$sock = new Socket(false, false, false, $sock);