Ethernet Sheild and GSM router

@SurferTim: It's a WebSocket server, the connection is persistent. The problem is, that the connect method of his library returns also false if a connection has been established but the initial handshake was not what it expected. The way the library is programmed, it assumes that the whole answer from the server is transferred in one packet and does no additional checking on that assumption.

This is the log of a interactive session doing the same:

 telnet ws.pusherapp.com 80
Trying 50.17.194.145...
Connected to ws.pusherapp.com.
Escape character is '^]'.
GET /app/8bce0224d7dae3e8e75e?client=js&version=1.9.0 HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: ws.pusherapp.com
Origin: ArduinoWebSocketClient

HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
WebSocket-Origin: ArduinoWebSocketClient
WebSocket-Location: ws://ws.pusherapp.com/app/8bce0224d7dae3e8e75e?client=js&version=1.9.0

{"event":"pusher:connection_established","data":"{\"socket_id\":\"13296.159584\"}"}

As you can see, there is no Content-Length header in the response but some JSON to parse. As the connect method just checks the first line till after the response code, I hacked the buffer length in. A correct parser would be the better solution but this needs a more in-depth knowledge of the protocol than I have.