1. Merge some upstream PRs
- Handling of errors - like unstable network - coming via SSL
fhessel#89
- WIP: Prevent crash on WebSocket request to non-WebSocket node.
fhessel#106
- Fix infinite loop when the buffer ends with \r
fhessel#123
- Fixed memory leak in the Websocket example
fhessel#157
2. Update examples and `README.md`
HTTPConnection::readLine has an infinite loop condition, when \r is the last character on the buffer, _bufferProcessed never gets updated, so the exit condition for the loop is never met.
With the modification in the first commit, the \r character gets accounted on its own and the buffer can be refreshed.
The downside is that the \n character will be considered on its own on the next iteration, and added to the _pareserLine.text rather than being grouped with \r and being counted as line terminator.
In the second commit, we keep track of the partial termination using a member variable, so as to detect the \r\n pair even when it happens across two different buffers, so that every problem with the first commit is resolved.