Workerman-Pusher:异步消息推送器

blogdaren

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开发的一个异步消息推送器: 
它能够模拟WEB后台单向异步推送业务通知。
 
3、简单配置

return array(
    //调试
    'debug' => true,

    //默认测试域名: 记得配置 /etc/hosts !!!
    'domain' => 'www.pusher.com',

    //模拟uid(也可以是订单id | 也可以是任务id | ....)
    'uids' => array('1', '2', '3', '4', '5', '6'),

    //超时: 秒
    'timeout' => array(
        'reconnect' => 2,
    ),

    //间隔: 秒
    'interval' => array(
        //页面弹窗通知间隔时间
        'notice' => 3,
        //客户端发送心跳间隔时间
        'client_heart' => 1,
    ),

    //socket
    'socket' => array(
        //监听服务
        'listen' => array(
            'web'       => 'http://0.0.0.0:7777',
            'pusher'    => 'websocket://0.0.0.0:3000',
            'inner'     => 'text://0.0.0.0:4000',
        ),
        //连接哪个内部推送地址
        'connect' => array(
            'inner'  => 'text://192.168.1.100:4000',
        ),
    ),
);

4、GITHUB
https://github.com/blogdaren/workerman-pusher/

5036 1 0
1个评论

walkor

感谢 blogdaren 的分享

  • 暂无评论
年代过于久远,无法发表评论

blogdaren

11886
积分
0
获赞数
0
粉丝数
2015-11-07 加入
🔝