libwebsockets/lib
Andy Green fc7c5e4539 reflect send completeness in lws_write return
under load, writing packet sizes to the socket that are normally fine
can do partial writes, eg asking to write 4096 may only take 2800 of
it and return 2800 from the actual send.

Until now lws assumed that if it was safe to send, it could take any
size buffer, that's not the case under load.

This patch changes lws_write to return the amount actually taken...
that and the meaning of it becomes tricky when dealing with
compressed links, the amount taken and the amount sent differ.  Also
there is no way to recover at the moment from a protocol-encoded
frame only being partially accepted... however for http file send
content it can and does recover now.

Small frames don't have to take any care about it but large atomic
sends (> 2K) have been seen to fail under load.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-23 10:50:10 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
base64-decode.c CMake support + fixed windows build. 2013-02-06 15:49:12 +09:00
client-handshake.c fix no extensions build 2013-02-18 10:43:18 +08:00
client-parser.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
client.c Print SSL error codes as well as the string. 2013-02-22 09:28:15 +08:00
daemonize.c style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-frame.c style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-frame.h Separate compression levels for server and client, 2013-01-10 12:45:54 +08:00
extension-deflate-stream.c style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-stream.h remove fixed rx buffer allow definition per protocol 2013-02-08 13:16:07 +08:00
extension.c Fixed DLL compilation on Windows for CMake. 2013-02-13 09:29:26 +08:00
getifaddrs.c style cleanup 2013-02-11 17:13:32 +08:00
getifaddrs.h style cleanup 2013-02-11 17:13:32 +08:00
handshake.c remove lws_ensure_user_space from public api change return 2013-02-18 16:30:10 +08:00
libwebsockets.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
libwebsockets.h move ssl cipher list from compiletime to context creation time option 2013-02-22 09:54:35 +08:00
Makefile.am disable fstack usage 2013-02-13 09:08:43 +08:00
minilex.c add lexical parser for headers 2013-01-18 01:55:48 +08:00
output.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
parsers.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
private-libwebsockets.h remove MAX_HEADER_NAME_LENGTH from header 2013-02-22 09:38:54 +08:00
server-handshake.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
server.c Print SSL error codes as well as the string. 2013-02-22 09:28:15 +08:00
sha-1.c Static variable is now const. 2013-01-09 15:14:31 +08:00