I was able to get this working as a server with some small changes to sendEncodedData(). I was getting SLOWWW speeds (like 2 seconds/msg for small sizes and 20 seconds/msg for 100-bytes). Changing the write() loop to a single print() fixed this (now getting about 1.6 messages/sec).
I was able to get this working as a server with some small changes to sendEncodedData(). I was getting SLOWWW speeds (like 2 seconds/msg for small sizes and 20 seconds/msg for 100-bytes). Changing the write() loop to a single print() fixed this (now getting about 1.6 messages/sec).
I tried doing longer ones but got protocol errors for length > 125. There's another small change in sendEncodedData().
Now getting about 1/sec at 1000 bytes and .8/sec at 2500 bytes. At 4000 bytes the poor little bugger choked.