WebSockets bugfix, updated Readme
This commit is contained in:
parent
b1f40db14a
commit
dd72d02643
4 changed files with 51 additions and 25 deletions
|
@ -1,3 +1,4 @@
|
|||
import asyncio
|
||||
from getpass import getpass
|
||||
from python_aternos import Client, atwss
|
||||
|
||||
|
@ -10,6 +11,10 @@ socket = s.wss()
|
|||
|
||||
@socket.wssreceiver(atwss.Streams.console)
|
||||
async def console(msg):
|
||||
print('Received: ' + msg)
|
||||
print('Received:', msg)
|
||||
|
||||
s.start()
|
||||
async def main():
|
||||
s.start()
|
||||
await socket.connect()
|
||||
|
||||
asyncio.run(main())
|
||||
|
|
Reference in a new issue