(1) This looks too much like an infinite loop waiting to happen. I think "!=" needs to change to "<" for safety:
while (nread != ba::buffer_size(buffer))
Also you could incorporate the if statement by changing to a "do .. while".
(2) This worries me too:
"* if we drop messages to clients does it make sense for the clients to continue in a possibly inconsistent state (it depends on the kind of dropped messages)"
If a busy client gets blocked doing other things just a bit too long, there's the real risk it won't be able to recover any more (rendering will freeze and never resume).
Whoops. Now that I look more closely:
(1) This looks too much like an infinite loop waiting to happen. I think "!=" needs to change to "<" for safety: size(buffer) )
while (nread != ba::buffer_
Also you could incorporate the if statement by changing to a "do .. while".
(2) This worries me too:
"* if we drop messages to clients does it make sense for the clients to continue in a possibly inconsistent state (it depends on the kind of dropped messages)"
If a busy client gets blocked doing other things just a bit too long, there's the real risk it won't be able to recover any more (rendering will freeze and never resume).