elchicodepython / elchicodepython/Python-awesome-Messages
Add ZeroMQ topics implementation
未关闭
enhancement
- 主要语言
- Python
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
- Support ZeroMQ topics.
- Support ZeroMQ authentication.
Demo sending JSON to ZeroMQ topic:
```
import sys
import time
port = "5556"
if len(sys.argv) > 1:
port = sys.argv[1]
int(port)
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:%s" % port)
import json
while True:
topic = "pac"
messagedata = json.dumps({"hello": "world"})
print ("%s %s" % (topic, messagedata))
socket.send_string("%s %s" % (topic, messagedata))
time.sleep(1)
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。