I have a technical question firstly. then the actual problem.
In bool Processbuffer(int bytes),
how does mReceiveBuffer maintain atomicity. Another thread can come and set it to null while it was actually processing the mreceivebuffer in another thread.
I have a custom server setup. I first tested with just simple console to simulate 1000 packets beings sent per second. What ends up happening is packets after a certain while stop sending, and keeping collecting in the mOut queue. Begin Send is never being invoked or callbacked after a point.
So for slow frequencies like 100 packets per second, its fine and works great. But if I increase it the client side(tcp protocol) fails to send packet and the mOut queue is just filling up .