deprecate no_buffer_all_partials
authorAndy Green <andy.green@linaro.org>
Mon, 18 Aug 2014 14:21:51 +0000 (22:21 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 18 Aug 2014 14:21:51 +0000 (22:21 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
changelog
lib/libwebsockets.h
lib/output.c

index 8e59225..95e6194 100644 (file)
--- a/changelog
+++ b/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
 =======================
 
index 3cd5b59..a0c500a 100644 (file)
@@ -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;
 
        /*
index 28e15a6..cd8da35 100644 (file)
@@ -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