Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
websockets help :/
#1
hello everyone,

so i've been trying to improve my skill with websockets, i tried to make a listener for chat42.online but no matter what i did i kept getting the same response back.

the code :

async def main():
    uri = "wss://chat42.online/ws"
    async with websockets.connect(uri=uri) as websocket:

        msg = await websocket.recv()
        print(f"{msg}")

asyncio.get_event_loop().run_until_complete(main())
i also tried to include the headers but nothing changed, i always get the response: b'\x10\x0c'


any help - clue is appreciated!
buran write Feb-07-2021, 03:00 PM:
Please, use python tags for code, not output tags
Reply


Messages In This Thread
websockets help :/ - by kimblee - Feb-07-2021, 02:01 PM
RE: websockets help :/ - by kimblee - Feb-11-2021, 01:06 PM
RE: websockets help :/ - by nilamo - Feb-12-2021, 09:32 PM
RE: websockets help :/ - by kimblee - Feb-15-2021, 01:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Listen TCP and send data to websockets neoboby 3 3,084 Feb-13-2023, 09:47 PM
Last Post: Vadanane
  Asyncio | Websockets - general problem starting the server dreamer 5 3,326 Oct-26-2022, 11:55 AM
Last Post: dreamer
  Slow websockets server -> client pattagghiu 0 2,427 Sep-17-2019, 09:28 AM
Last Post: pattagghiu
  Flask and Websockets == True? rxndy 2 2,860 Apr-21-2019, 04:08 PM
Last Post: rxndy
  Send Pressure sensor data to IoT platform using WebSockets in Python barry76 3 4,680 Mar-12-2019, 09:48 AM
Last Post: barry76

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020