nanomsg-pythonnanomsg 的 Python 实现
nanomsg-python 是 nanomsg 的 Python 语言实现版本,用于 CPython 和 PyPy。
Example
from __future__ import print_function
from nanomsg import Socket, PAIR, PUB
s1 = Socket(PAIR)
s2 = Socket(PAIR)
s1.bind('inproc://bob')
s2.connect('inproc://bob')
s1.send(b'hello nanomsg')
print(s2.recv())
s1.close()
s2.close()评论
