WebSocket

RabbitMQ通过websocket与前端通信

本文主要介绍的是RabbitMQ的一个插件 —— STOMP,还有一个MQTT插件,也是不错的选择,详见:RabbitMQ插件之MQTT 如何安装rabbitmq,请移步:http://www.cuiwei.net/p/1371869141 启用stomp插件 vi enabled_plugins [...,rabbitmq_stomp,rabbitmq_web_stomp]. 重启rabbitmq后,访问 RabbitMQ Management 可以看到 http/web-stomp服务(ws)已经启动了,在15674端口上了 https/web-stomp服务(wss)已经启动了,在1...

Redis 中的订阅消息转发到 WebSocket 客户端

WebSocketTest.php <?php class WebSocketTest { public \Swoole\WebSocket\Server $server; public function __construct() { $this->server = new Swoole\WebSocket\Server("0.0.0.0", 9502); $this->server->on('open', function (Swoole\WebSocket\Server $server, $request) { ...