1、What is Workerman-Pusher
A simple message pusher written based on workerman, which can simulate WEB background one-way push business notification to clients asynchronously.
2、它是什么
workerman-pusher 是基于workerman開發(fā)的一個(gè)異步消息推送器:?
它能夠模擬WEB后臺(tái)單向異步推送業(yè)務(wù)通知。
?
3、簡(jiǎn)單配置
return array(
//調(diào)試
'debug' => true,
//默認(rèn)測(cè)試域名: 記得配置 /etc/hosts !!!
'domain' => 'www.pusher.com',
//模擬uid(也可以是訂單id | 也可以是任務(wù)id | ....)
'uids' => array('1', '2', '3', '4', '5', '6'),
//超時(shí): 秒
'timeout' => array(
'reconnect' => 2,
),
//間隔: 秒
'interval' => array(
//頁(yè)面彈窗通知間隔時(shí)間
'notice' => 3,
//客戶端發(fā)送心跳間隔時(shí)間
'client_heart' => 1,
),
//socket
'socket' => array(
//監(jiān)聽服務(wù)
'listen' => array(
'web' => 'http://0.0.0.0:7777',
'pusher' => 'websocket://0.0.0.0:3000',
'inner' => 'text://0.0.0.0:4000',
),
//連接哪個(gè)內(nèi)部推送地址
'connect' => array(
'inner' => 'text://192.168.1.100:4000',
),
),
);
感謝 blogdaren 的分享