Posted September 20, 2024Sep 20 this is my GOAL to create a server on python working on websockets (for web client). So, please, who can share a documentation with me ? or can give some helpful links ? Thank you community!
September 20, 2024Sep 20 WebSockets just wrap the protocol communication through HTTP-like headers. You may need to implement WSS proxy support, and there isn’t really documentation for that An easy way to probe for HTTP/WebSockets is to check if the first byte of the packet starts with G, and if it does then transition to using a WebSocket handler to then read/write data as usual
September 20, 2024Sep 20 No, the packets are still TCP. The difference is that the data for the classic protocol is wrapped in the WebSocket header.
September 20, 2024Sep 20 Author so, communication between server and web client must be via ws headers ? datas sent via ws headers i mean
September 20, 2024Sep 20 Not through headers but using the WebSocket specification to send compatible WebSockets
September 20, 2024Sep 20 Author Hard to understand without examples 🙂 It will be great to get some examples in python , but i not sure that we have such example Not Sure, but i got this Quote GET / HTTP/1.1 Host: 127.0.0.1:8888 Connection: Upgrade Pragma: no-cache Cache-Control: no-cache User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Upgrade: websocket Origin: http://127.0.0.1 Sec-WebSocket-Version: 13 Accept-Encoding: gzip, deflate, br, zstd Accept-Language: en-US,en;q=0.9,ru;q=0.8,pt;q=0.7,uk;q=0.6 Cookie: connect.sid=s%3AEN_sR4WVGueHOM6GHwdyQ9sHx6L36mNd.NPLkUHBqd%2BG28RdSi9VOAHo5zK9WkiQfNhSL5tAQtOY Sec-WebSocket-Key: bXuMQw56Svbcw4ZSaehGeA== Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Sec-WebSocket-Protocol: ClassiCube Edited September 20, 2024Sep 20 by ToShuk.KR
September 20, 2024Sep 20 While I have not cared for looking at the source code this appears to be a semi-popular (relatively) python based classicube server from which you can look for examples, I have joined a few servers running this before. https://github.com/EdwardJXLi/ProjectObsidian
September 20, 2024Sep 20 Author 1 hour ago, morgana said: While I have not cared for looking at the source code this appears to be a semi-popular (relatively) python based classicube server from which you can look for examples, I have joined a few servers running this before. https://github.com/EdwardJXLi/ProjectObsidian Thanks, but this server looks like without ws
this is my GOAL to create a server on python working on websockets (for web client). So, please, who can share a documentation with me ? or can give some helpful links ?
Thank you community!