We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server.py: `import asyncio import aiozmq.rpc
class Handler(aiozmq.rpc.AttrHandler):
def __init__(self): self.connected = False @aiozmq.rpc.method def remote_func(self, data: dict): self.connected = True print(data)
async def go(): handler = Handler() subscriber = await aiozmq.rpc.serve_pubsub( handler, subscribe='topic', bind='tcp://127.0.0.1:5566', log_exceptions=True) print("SERVE start")
while True: await asyncio.sleep(1) subscriber.close() await subscriber.wait_closed()
asyncio.run(go()) `
client.py: `import asyncio import aiozmq.rpc
async def go(): publisher = await aiozmq.rpc.connect_pubsub( connect='tcp://127.0.0.1:5566') print(publisher) await publisher.publish('topic').remote_func(2)
why can't run in python 3.8.2? thx
The text was updated successfully, but these errors were encountered:
No branches or pull requests
server.py:
`import asyncio
import aiozmq.rpc
class Handler(aiozmq.rpc.AttrHandler):
async def go():
handler = Handler()
subscriber = await aiozmq.rpc.serve_pubsub(
handler, subscribe='topic', bind='tcp://127.0.0.1:5566',
log_exceptions=True)
print("SERVE start")
asyncio.run(go())
`
client.py:
`import asyncio
import aiozmq.rpc
async def go():
publisher = await aiozmq.rpc.connect_pubsub(
connect='tcp://127.0.0.1:5566')
print(publisher)
await publisher.publish('topic').remote_func(2)
asyncio.run(go())
`
why can't run in python 3.8.2?
thx
The text was updated successfully, but these errors were encountered: