lightbug_http
lightbug_http copied to clipboard
Websocket: first commit
Hello, here is what we've got so far:
- upgrade http request to websocket
- send all size
- receive all size
- works with select for non-blocking
all sizes means len(data)
<=125
, <2**16
, <((2**64)>>8)
Â
Many things not done:
- ping/pong
- fragment message
(and more)
Â
There is a need to think about how it's gonna be integrated, we'll need to organize the flags in aliases, for example.
Error handling seem like a great priority :+1:
Â
Note that the code appears to be more complicated than what it is doing,
because we're doing extra steps to work with ByteArray (PythonObject
) in this example.