Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- 测试环境:
- python3.6
- pyzmq==17.0.0
- '''
- import time
- import zmq
- context = zmq.Context()
- socket = context.socket(zmq.PUB)
- socket.bind('tcp://127.0.0.1:2000')
- # Allow clients to connect before sending data
- for i in range(1,100):
- socket.send_pyobj({i:[1,2,3]})
- time.sleep(1)
Add Comment
Please, Sign In to add comment