Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
x/net/websocket: Ability to reuse read/write buffers between connections. #18048
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
If this seems relevant, I am ready to implement this code according to the standard process of contributing.