There is a problem when a large (>345 kB) message is being written to a websocket. The connection will actually time out, unless this while
is in place. Unfortunately, this pretty much busy-waits. But whatever the queueing mechanism is, is broken at least for websockets and large messages. My messages are ~2MB.
.154 AndroidAsync: before:1926139
.154 AndroidAsync: remaining:1577171
.156 AndroidAsync: before:1926139
.156 AndroidAsync: remaining:1577171
.158 AndroidAsync: before:1926139
...
.240 AndroidAsync: remaining:0
Without this, your connection will be dropped by the remote side. Tested with C++ qtwebsockets
and Python websockets
clients.
The two part write()/handleRemaining() does not seem to handlw when handleRemaining() still has remaining properly.