mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Websocket connection, w bi-directional transport complete
This commit is contained in:
@@ -21,9 +21,12 @@ async def echo(websocket, path):
|
||||
tx = pong(message)
|
||||
await websocket.send(tx)
|
||||
|
||||
|
||||
def pong(message):
|
||||
print('Ping Received')
|
||||
return "pong"
|
||||
|
||||
|
||||
start_server = websockets.serve(echo, "127.0.0.1", 1337)
|
||||
|
||||
asyncio.get_event_loop().run_until_complete(start_server)
|
||||
|
||||
Reference in New Issue
Block a user