c++ - Is there a way to drain websocket in boost asio? - Stack Overflow

admin2025-04-26  7

I am using asio/beast for tcp ssl connections. Calling async_read in a loop inside corouties.
In situations when I have N packets on websocket I need to do N async_reads to drain the websocket. This sometimes creates over-scheduling bottleneck for me when throughput is high. Is there a way to copy all data available on the ws with single read, or any other way to avoid over-scheduling?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745650208a312123.html

最新回复(0)