-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Socket.recv_into: Is there any way to recv data directly to an existing buffer? #2057
Comments
It is not yet implemented, but we could use the newer C API to implement a |
cool ! looking forward to this feature. |
hi @minrk There’s another new feature you might want to hear about: recv_multipart always accept all data, which is not cool.
If I can use the previous Frame or even the first Frame to determine whether the subsequent Frame is needed,
I know that when notifying the socket to read, the multipart is actually ready, but one less copy is always better
|
_recv_frame always creates a new Frame.
This will result in one more copy of the data, which is not cool.
Is there any way to recv data directly to an existing buffer?
This way I can pass in the pre-allocated buffer instead of copying the data in the Frame to where it should go.
When using the C language API, you always need to prepare a buffer.
C language can always achieve all the things.
The text was updated successfully, but these errors were encountered: