Skip to content
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

x/net/websocket: Ability to reuse read/write buffers between connections. #18048

Closed
gobwas opened this issue Nov 25, 2016 · 1 comment
Closed

x/net/websocket: Ability to reuse read/write buffers between connections. #18048

gobwas opened this issue Nov 25, 2016 · 1 comment

Comments

@gobwas
Copy link

@gobwas gobwas commented Nov 25, 2016

Hello!

Some applications that use web sockets may be very limited in memory consumption. It would be great if it were possible to reuse the read and write buffers between connections.

For example, some may use epoll to detect activity among idle connections and start to use the read buffer only at this moment. The situation is even more obvious to reuse the write buffer - application always knows when it wants to write to the socket.

To achieve this purpose it is sufficient to make small changes in the packet x/net/websocket. A draft version of such changes is here (just for the diff look).

If this seems relevant, I am ready to implement this code according to the standard process of contributing.

Thanks!

@gobwas
Copy link
Author

@gobwas gobwas commented Aug 22, 2017

Eventually implemented ws library.

@gobwas gobwas closed this Aug 22, 2017
@golang golang locked and limited conversation to collaborators Aug 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.