If you're sending a test message >125 bytes but <65536, your problem might be caused by a faulty format string to pack. I think this one should be 'CCn' (your current code writes the 2 bytes of the length in the wrong order).
If that doesn't help, you could try some client-side logging:
- Does the onopen callback run to prove that the initial handshake completed successfully?
- Do the onerror or onclose callbacks run, either after connection or after your server sends its message?