recv() may not return all data

While performing handshake recv() is called only once.
It may return only part of the data and handshake
will fail. This patch modifies libwebsocket_service_fd()
to ensure that there is not data left in the socket.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@auriga.com>
2 files changed