How to handle WebSocket messages in an appmod using Yaws?
I have created a simple appmod that sends back the same message as it receives. But I get an error message at the command prompt and the WebSocket connection is closed. If I send a message with 3 chars I get this error message: =ERROR REPORT==== 8-Feb-2012::05:09:14 === Error in process <0.59.0> with exit value: {undef,[{mywebsocket,handle_message,[ {text,<<3 bytes>>}],[]},{lists,map,2,[{file,"lists.erl"},{line,1173}]},{yaws_web sockets,loop,4,[{file,"yaws_websockets.erl"},{line,151}]}]} What am I doing wrong? The handle uses text , and it doesn't work if I use binary either. Here is my HTML