Skip to content

Commit

Permalink
v0.14 application 模板更新
Browse files Browse the repository at this point in the history
  • Loading branch information
zgldh committed May 14, 2015
1 parent e0fea4d commit d14075e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions templates/GatewayBusinessWorkerApplication/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$gateway->pingInterval = 10;
// 心跳数据
$gateway->pingData = '{"type":"ping"}';
$gateway->setStoreConfig($config['store']);
/*
// 当客户端连接上来时,设置连接的onWebSocketConnect,即在websocket握手时的回调
$gateway->onConnect = function($connection)
Expand All @@ -44,6 +45,7 @@
$worker->name = 'TodpoleBusinessWorker';
// bussinessWorker进程数量
$worker->count = 4;
$worker->setStoreConfig($config['store']);

//// WebServer
//$web = new WebServer("http://0.0.0.0:8686");
Expand Down
3 changes: 2 additions & 1 deletion templates/WorkerApplication/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ function handle_close($connection)

$text_worker->onConnect = 'handler_connection';
$text_worker->onMessage = 'handle_message';
$text_worker->onClose = 'handle_close';
$text_worker->onClose = 'handle_close';
$text_worker->setStoreConfig($config['store']);

0 comments on commit d14075e

Please sign in to comment.