I am not sure this is the right group to post this in, but I'm desparate to find a sollution for the following problem.

I am creating an Ff extension (Game, Multiplayer PONG), which creates a TCP connection between 2 clients using the (short version) the code below.

Every 33ms a client will write a 24 bytes string, which is read/handled by the other client asynchronosly. The problem is that it does not actually write (or read maybe...) every 33ms, but +/- every 200ms a client will receive
about 6-7 packages at once.

My first guess is that Nagle or TCP_NODELAY is on, but I could not find it for sure in the netlib libraries on lxr. Does anyone know if Nagle is on? Or does anyone have a clue on what else might be the problem? Might there be some buffer that waits until is has n bytes, before it actually does something?

Thanks in advance.

Best regards Martijn Kooij

Code example write...
oTrans = onsITransportService.createTransport ( null, 0, host, 10997, proxyinfo );
oOutputStream = oTrans.openOutputStream(0, 0, 0);
oOutputStream.write(sText, sText.length);

Code example read...
ServerSocketListener =
{
        onSocketAccepted : function(socket, transport)
        {
                oInput = transport.openInputStream(0, 0, 0);
                //Long piece of code to init async reading...
        }
};
oServer.init(10998, false, -1);
oServer.asyncListen(ServerSocketListener);
_______________________________________________
Mozilla-netlib mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to