-
-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Labels
Description
Based on a suggestion by @cjerdonek in #296, I'm creating this new issue for clarity.
When receiving a fragmented message, it might be desireable to obtain the fragments without reassembling, to avoid a memory copy which may not be necessary.
Most likely this could be enabled by providing a variant of recv
. I'd say it should be a separate function because it would have a different return type.
That function could return an async iterator (after we drop support for Python 3.4).
max_size
should be re-interpreted as the maximum size of each chunk / frame rather than message.
The original suggestion was a file-like object. This needs some thought. It may require a layer of buffering which may negate the performance benefits.
dmitryduka