Does Nagle's Algorithm need to be disabled client side as well? If this is the case, I have not found a way to disable Nagle's algorithm through JavaScript alone.
I am trying to stream data across a websocket, from a PHP CLI server hosted on Raspbian OS (have also hosted on Windows 7 and Ubuntu with same results). This server has successfully created the socket and accepts multiple connections, and has set the TCP_NODELAY flag (verified with socket_get_option only).
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)
socket_set_option($sock, SOL_SOCKET, TCP_NODELAY, 1);
On most platforms, regardless of this TCP_NODELAY flag being set, the data will stream without clumping. However, on Windows 7 Chrome and Firefox, the data arrives in chunks (with a telltale 0.2s delay). On Windows 8, Linux, iOS, and Windows 7's Internet Explorer 11: I don't see this problem at all.
http://www.13willows.com/hovelme/script/serverControl.php Here is the test website, click "Connect", then click "View Game" and you should see a Current Packet steadily incrementing from 1 to 20, every 50ms. However, on some clients, it jumps 4 at a time approx every 200ms.
Any ideas to get this to stop? Will using node.js / socket.io fix something like this and still allow me to run code from a user's browser?