Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Apr 25, 2016
1 parent 31e0149 commit 713ebdc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
exit("start.php not support windows, please use start_for_win.bat\n");
}

// 标记是全局启动
define('GLOBAL_START', 1);

// 加载IO 和 Web
require_once __DIR__ . '/start_io.php';
require_once __DIR__ . '/start_web.php';

// 标记是全局启动
define('GLOBAL_START', 1);

// 运行所有服务
Worker::runAll();
2 changes: 2 additions & 0 deletions start_io.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use Workerman\Lib\Timer;
use PHPSocketIO\SocketIO;

include __DIR__ . '/vendor/autoload.php';

// 全局数组保存uid在线数据
$uidConnectionMap = array();
// 记录最后一次广播的在线用户数
Expand Down
2 changes: 2 additions & 0 deletions start_web.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use Workerman\Lib\Timer;
use PHPSocketIO\SocketIO;

include __DIR__ . '/vendor/autoload.php';

// 启动一个webserver,用于吐html css js,方便展示
// 这个webserver服务不是必须的,可以将这些html css js文件放到你的项目下用nginx或者apache跑
$web = new WebServer('http://0.0.0.0:2123');
Expand Down

0 comments on commit 713ebdc

Please sign in to comment.