[haXe] bug in neko.net.ServerLoop?
Nicolas Cannasse
ncannasse at motion-twin.com
Fri Nov 3 19:42:41 CET 2006
> ok, bee tearing my hair out and I think I have found a bug. its not in ServerLoop directly I don't think, I think its from neko.net.SocketInput.readBytes - randomly (as far as I can tell) it returns a number that is smaller than the length of the buffer.
>
> I threw some comments around line 165 of ServerLoop.hx and tested cl.buffer.length against nbytes. they usually match except in a random occurrence where they do not and nbytes returns something much smaller which crashes my app.
>
> can someone verify this for me? I need this bug fixed for my server to work.
nbytes is the number of bytes that's just been readed from the buffer.
It's possibly lower than cl.buffer.length if not the whole data can be
read at one time. You should then returns 0 in processClientData and
wait the buffer to match your message size.
Nicolas
More information about the Haxe
mailing list