1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

partial always use partial buffering if send incomplete

After "rerelease"

https://github.com/warmcat/libwebsockets/issues/392#issuecomment-170003294

Since we introduced partial buffering a long while ago,
user code shold never see partial sends and very few
user callbsck attempt to deal with them.

Let's just eliminate the whole concept of user callback
partial send handling under any circumstances.

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-01-08 21:52:47 +08:00
parent 27174e64de
commit 5eeb4bd0d3

View file

@ -171,16 +171,6 @@ handle_truncated_send:
/* what we just sent went out cleanly */
return n;
if (n && wsi->u.ws.clean_buffer)
/*
* This buffer unaffected by extension rewriting.
* It means the user code is expected to deal with
* partial sends. (lws knows the header was already
* sent, so on next send will just resume sending
* payload)
*/
return n;
/*
* Newly truncated send. Buffer the remainder (it will get
* first priority next time the socket is writable)