fr33r4ng3r/ArduinoWebsocketClient — pull request #1 by quinkennedy (2012-10-25 15:21:51+00:00)
Title: support Stream for logging, and added logging of Handshake call/response

I generalized the setDebug and other debug methods to use Stream instead of SoftwareSerial, this will allow support for HardwareSerial and any other Stream-based way someone may want to log.

I also added a preprocessor variable HANDSHAKE that can be used to turn on/off logging of the handshake call/response.

I also noticed that the example doesn't seem to work. My hunch is that echo.websocket.org does not support the newer spec. When I pass in 'chat' as the protocol, then echo.websocket.org will at least accept my handshake, but when I try to send a message it immediately closes the connection. If I supply no protocol (defaults to NULL), then echo..org doesn't accept the connection at all.

When I was testing against my own websocket server (based on the ws module in nodejs, which supports hixie 76 and hybi 17) I was able to send and receive messages as expected.