r/ComputerCraft • u/hiiambobthebob • Nov 30 '22
websockets issue
im using python as my websocket server (websockets package)
when my turtle tries to connect i get no close frame recived or sent on the python side and could not connect on my turtle
python code:
import asyncio
import websockets
async def handler(websocket, path):
print(path)
data = await websocket.recv()
reply = f"Data recieved as: {data}!"
await websocket.send(reply)
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(
websockets.serve(handler, "172.22.1.5", 9090)
)
asyncio.get_event_loop().run_forever()lua code:
local t,e = http.websocket(ws://turtle-hive.hive:9090/)
print(t)
print(e)any help is greatly apricated
0
Upvotes
2
u/fatboychummy Nov 30 '22
Please show us your code. We can do absolutely nothing to help you otherwise.