Aymeric Augustin

Results 368 comments of Aymeric Augustin

The URL router should be swappable anyway, similar to `create_protocol=WebSocketServerProtocol` for swapping the protocol class.

If we get a solid integration with sanic (cf. https://github.com/channelcat/sanic/issues/1214) we could point to sanic rather than write our own router. Or we could write our own router because that's...

I have to give you more context :-) ---- The backwards compatibility policy says that I intend to maintain backwards compatibility for 5 years after deprecating an API. No worries...

Yes I'm familiar with ASGI. (I'm a Django committer; in 2013, I investigated what it would take to make Django async and failed; then Andrew picked up this flag and...

Sanic has the same issue: https://github.com/sanic-org/sanic/pull/2154 However they're actively moving to the Sans-I/O implementation which will remove the dependency on the handshake module.

Hello! The Sans-I/O layer I was discussing earlier is now a public API in websockets 10.0. Here's how to integrate it: - https://websockets.readthedocs.io/en/stable/howto/sansio.html - https://websockets.readthedocs.io/en/stable/reference/server.html#sans-i-o Here's Sanic adopting it: -...

Probably, the fastest solution will be to patch the library around here: https://github.com/aaugustin/websockets/blob/017a072705408d3df945e333e5edd93e0aa8c706/src/websockets/client.py#L101 Add something along the lines of `await self.reader.read(...)` and see if you get something. Definitely something worth...

#676 (WIP) parses HTTP response bodies in the easy cases (no Transfer-Encoding) which is a good step towards getting this done.

@dmitryduka Your proposal doesn't work because `read_frame` is executed by `transfer_data_task`; you can't call it separately.

If the ability to receive individual fragments instead of messages must be provided on a per-message basis, there are several situations to consider: 1. nothing received 2. one message partially...