mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
deprecate no_buffer_all_partials
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
66d466a1a4
commit
822241c2a7
3 changed files with 11 additions and 11 deletions
10
changelog
10
changelog
|
@ -22,6 +22,16 @@ ssl and non-ssl connections are possible and may need to be treated differently
|
|||
in the user code.
|
||||
|
||||
|
||||
User api removal
|
||||
----------------
|
||||
|
||||
protocols struct member no_buffer_all_partial_tx is removed. Under some
|
||||
conditions like rewriting extention such as compression in use, the built-in
|
||||
partial send buffering is the only way to deal with the problem, so turning
|
||||
it off is deprecated.
|
||||
|
||||
|
||||
|
||||
v1.3-chrome37-firefox30
|
||||
=======================
|
||||
|
||||
|
|
|
@ -858,14 +858,6 @@ typedef int (extension_callback_function)(struct libwebsocket_context *context,
|
|||
* libwebsockets_remaining_packet_payload(). Notice that you
|
||||
* just talk about frame size here, the LWS_SEND_BUFFER_PRE_PADDING
|
||||
* and post-padding are automatically also allocated on top.
|
||||
* @no_buffer_all_partial_tx: Leave at zero if you want the library to take
|
||||
* care of all partial tx for you. It's useful if you only have
|
||||
* small tx packets and the chance of any truncated send is small
|
||||
* enough any additional malloc / buffering overhead is less
|
||||
* painful than writing the code to deal with partial sends. For
|
||||
* protocols where you stream big blocks, set to nonzero and use
|
||||
* the return value from libwebsocket_write() to manage how much
|
||||
* got send yourself.
|
||||
* @id: ignored by lws, but useful to contain user information bound
|
||||
* to the selected protocol. For example if this protocol was
|
||||
* called "myprotocol-v2", you might set id to 2, and the user
|
||||
|
@ -890,7 +882,6 @@ struct libwebsocket_protocols {
|
|||
callback_function *callback;
|
||||
size_t per_session_data_size;
|
||||
size_t rx_buffer_size;
|
||||
int no_buffer_all_partial_tx;
|
||||
unsigned int id;
|
||||
|
||||
/*
|
||||
|
|
|
@ -275,8 +275,7 @@ LWS_VISIBLE int libwebsocket_write(struct libwebsocket *wsi, unsigned char *buf,
|
|||
if (wsi->u.ws.inside_frame)
|
||||
goto do_more_inside_frame;
|
||||
|
||||
/* if he wants all partials buffered, never have a clean_buffer */
|
||||
wsi->u.ws.clean_buffer = !wsi->protocol->no_buffer_all_partial_tx;
|
||||
wsi->u.ws.clean_buffer = 1;
|
||||
|
||||
/*
|
||||
* give a chance to the extensions to modify payload
|
||||
|
|
Loading…
Add table
Reference in a new issue