Beispiel #1
0
 public function run()
 {
     $oPlayerInit = new Game_PlayerInit();
     while ($data = $this->get_user()) {
         foreach ($data as $user) {
             if ($user['name']) {
                 $oPlayerInit->useRandomName($user['name']);
             }
         }
     }
     echo 'done!';
 }
Beispiel #2
0
<?php

/**
 * 异步激活玩家服务 
 * @author zhangh@uuzu.com
 * @date 2012-2-27
 */
require dirname(__FILE__) . '/../global.php';
TenYear::getInstance();
ini_set('default_socket_timeout', -1);
Com_AdCache::factory()->set_timeout(0);
$objGameInit = new Game_PlayerInit();
$objGameInit->register_active();
echo "start receive \r\n";
//开始接收
Com_Queued::waittime(60);
Com_Queued::receive_all();