Ratchet PHP WAMP - React / ZeroMQ - Specific user broadcast

后端 未结 2 1588
粉色の甜心
粉色の甜心 2021-02-02 13:54

Note: This is not the same as this question which utilises MessageComponentInterface. I am using WampServerInterface<

2条回答
  •  迷失自我
    2021-02-02 14:22

    To send to specific users, you need a ROUTER-DEALER pattern instead of PUB-SUB. This is explained in the Guide, in chapter 3. Security, if you're using ZMQ v4.0, is handled at the wire level, so you don't see it in the application. It still requires some work, unless you use the CZMQ binding, which provides an authentication framework (zauth).

    Basically, to authenticate, you install a handler on inproc://zeromq.zap.01, and respond to requests over that socket. Google ZeroMQ ZAP for the RFC; there is also a test case in the core libzmq/tests/test_security_curve.cpp program.

提交回复
热议问题