Websockets client!

Ok, tried running Spacebrew on my local machine. As expected, a much better response all round, but the same freezes happen.

After replacing with _client.read(temppack,len) as per your suggestion, I now get hard fault SOSes very consistently, so despite the critical error, I consider this a step closer towards finding the culprit.

I did an analysis of the incoming message *char, here's a snippet of my serial output:

(length:86) : {"message":{"name":"LED","type":"boolean","value":"false","clientName":"NormalNinja"}}
(length:85) : {"message":{"name":"LED","type":"boolean","value":"true","clientName":"NormalNinja"}}
(length:33) : {"message":{"name":"LED","t

(I added a message length count at the beginning of each received message, as I wanted to monitor and keep all messages within 126 bytes - the maximum websocket packet size without resorting to payload extensions)

In the third line above, it looks almost as if the incoming data got truncated halfway in, perhaps with the next data frame. Again this is hinting towards potential data transmission conflicts, perhaps between the websocket library and TCPClient?

@ekbduffy it'll be great if you can run through the above tests and see if you can reproduce the 'freezes'.