fix #309. Receive large messages over WSS
author=?UTF-8?q?Jos=C3=A9=20Luis=20Mill=C3=A1n?= <jmillan@aliax.net>
Wed, 19 Aug 2015 14:23:33 +0000 (16:23 +0200)
committerAndy Green <andy.green@linaro.org>
Mon, 12 Oct 2015 00:07:38 +0000 (08:07 +0800)
commit4c0ba02771e56dfd50ca7d01b76f536c6e10be95
tree43f50dc15565aa7736a4c758a4eb4380d658f2bf
parent020c53c8cc4a0f672909164d2d1974662747a892
fix #309. Receive large messages over WSS

Read the full incoming TLS/SSL record at once in libwebsocket_service_fd().

SSL_read() is called until no more pending data for the current record is buffered in SSL.
SSL_read() is never requested more than the pending data size for the current record
to ensure that the fd is not read again for new data, which would be copied in the SSL buffer otherwise.
lib/output.c
lib/private-libwebsockets.h
lib/service.c
lib/ssl.c