34 lines
811 B
PHP
34 lines
811 B
PHP
<?php
|
|
/**
|
|
* Created by gzhq.
|
|
* User: 252378189@qq.com
|
|
* Date: 2017/12/28
|
|
* Time: 20:26
|
|
*/
|
|
include("../include/config.inc.game.php");
|
|
include("../class/gzhq_swoole.class.php");
|
|
|
|
//在线用户列表
|
|
$GLOBALS['USER_LIST'] = new swoole_table(204800);
|
|
$GLOBALS['USER_LIST']->column('fd', swoole_table::TYPE_INT, 4);
|
|
$GLOBALS['USER_LIST']->create();
|
|
|
|
//在线用户连接列表
|
|
$GLOBALS['USER_LIST_FD'] = new swoole_table(204800);
|
|
$GLOBALS['USER_LIST_FD']->column('uid', swoole_table::TYPE_STRING, 15);
|
|
$GLOBALS['USER_LIST_FD']->create();
|
|
|
|
$server = new gzhq_swoole(":","10120");
|
|
|
|
$server->redis_pool = new RedisPool();
|
|
$server->mysql_pool = new MysqlPool();
|
|
|
|
//进行游戏配置的初始化
|
|
$redis = $server->redis_pool->get();
|
|
hotUpdata($redis,true);
|
|
|
|
$server->redis_pool->put($redis);
|
|
|
|
$server->start();
|
|
?>
|