gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

[WebSocket] data must start with \x00 #55

Closed kevinkub closed 13 years ago

kevinkub commented 13 years ago

I'm getting the error "[WebSocket] data must start with \x00" whenever I send data from my Server to the Client. Everything works fine in Chrome and Safari. I use http://code.google.com/p/phpwebsocket/ as Server Software.

gimite commented 13 years ago

I tried the sample i.e. http://code.google.com/p/phpwebsocket/source/browse/trunk/%20phpwebsocket/server.php without modification, and it worked fine for me with latest web-socket-js. Can you pull latest web-socket-js and try again?

I found that phpwebsocket outputs extra "\x00" in the first message e.g. "\x00hello human" instead of "hello human". This is probably a bug of phpwebsocket. It may confuse old web-socket-js implementation.

kevinkub commented 13 years ago

I'm sorry. I just tried the object oriented example... server.php works fine for me, too. I'll try to fix this issue and the extra "\x00" in phpwebsocket. Thank you!