packaging: support smack manifest and cleanup
[profile/ivi/libwebsockets.git] / changelog
index ecce0ce..f0278dc 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,7 +1,100 @@
 Changelog
 ---------
 
-(development since 1.1....)
+(development since 1.22)
+
+User api additions
+------------------
+
+ - You can now call libwebsocket_callback_on_writable() on http connectons,
+       and get a LWS_CALLBACK_HTTP_WRITEABLE callback, the same way you can
+       regulate writes with a websocket protocol connection.
+
+ - A new member in the context creation parameter struct "ssl_cipher_list" is
+       added, replacing CIPHERS_LIST_STRING.  NULL means use the ssl library
+       default list of ciphers.
+
+User api changes
+----------------
+
+ - the external poll callbacks now get the socket descriptor coming from the
+       "in" parameter.  The user parameter provides the user_space for the
+       wsi as it normally does on the other callbacks.
+       LWS_CALLBACK_FILTER_NETWORK_CONNECTION also has the socket descriptor
+       delivered by @in now instead of @user.
+
+ - libwebsocket_write() now returns -1 for error, or the amount of data
+       actually accepted for send.  Under load, the OS may signal it is
+       ready to send new data on the socket, but have only a restricted
+       amount of memory to buffer the packet compared to usual.
+
+
+User api removal
+----------------
+
+ - libwebsocket_ensure_user_space() is removed from the public api, if you
+       were using it to get user_space, you need to adapt your code to only
+       use user_space inside the user callback.
+
+ - CIPHERS_LIST_STRING is removed
+
+
+v1.21-chrome26-firefox18
+========================
+
+ - Fixes buffer overflow bug in max frame size handling if you used the
+       default protocol buffer size.  If you declared rx_buffer_size in your
+       protocol, which is recommended anyway, your code was unaffected.
+
+v1.2-chrome26-firefox18
+=======================
+
+Diffstat
+--------
+
+ .gitignore                                                      |  16 +++
+ CMakeLists.txt                                                  | 544 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ LICENSE                                                         | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Makefile.am                                                     |   1 +
+ README                                                          |  20 +++
+ README.build                                                    | 258 ++++++++++++++++++++++++++++++++-----
+ README.coding                                                   |  52 ++++++++
+ changelog                                                       | 136 ++++++++++++++++++++
+ cmake/FindOpenSSLbins.cmake                                     |  33 +++++
+ config.h.cmake                                                  | 173 +++++++++++++++++++++++++
+ configure.ac                                                    |  22 +++-
+ lib/Makefile.am                                                 |  20 ++-
+ lib/base64-decode.c                                             |   2 +-
+ lib/client-handshake.c                                          | 190 +++++++++++-----------------
+ lib/client-parser.c                                             |  88 +++++++------
+ lib/client.c                                                    | 384 ++++++++++++++++++++++++++++++-------------------------
+ lib/daemonize.c                                                 |  32 +++--
+ lib/extension-deflate-frame.c                                   |  58 +++++----
+ lib/extension-deflate-stream.c                                  |  19 ++-
+ lib/extension-deflate-stream.h                                  |   4 +-
+ lib/extension.c                                                 |  11 +-
+ lib/getifaddrs.c                                                | 315 +++++++++++++++++++++++-----------------------
+ lib/getifaddrs.h                                                |  30 ++---
+ lib/handshake.c                                                 | 124 +++++++++++-------
+ lib/libwebsockets.c                                             | 736 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
+ lib/libwebsockets.h                                             | 237 ++++++++++++++++++++++------------
+ lib/output.c                                                    | 192 +++++++++++-----------------
+ lib/parsers.c                                                   | 966 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------
+ lib/private-libwebsockets.h                                     | 225 +++++++++++++++++++++------------
+ lib/server-handshake.c                                          |  82 ++++++------
+ lib/server.c                                                    |  96 +++++++-------
+ libwebsockets-api-doc.html                                      | 189 ++++++++++++++++++----------
+ libwebsockets.spec                                              |  17 +--
+ test-server/attack.sh                                           | 148 ++++++++++++++++++++++
+ test-server/test-client.c                                       | 125 +++++++++---------
+ test-server/test-echo.c                                         |  31 +++--
+ test-server/test-fraggle.c                                      |  32 ++---
+ test-server/test-ping.c                                         |  52 ++++----
+ test-server/test-server.c                                       | 129 ++++++++++++-------
+ win32port/libwebsocketswin32/libwebsocketswin32.vcxproj         | 279 ----------------------------------------
+ win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters |  23 +++-
+ 41 files changed, 4398 insertions(+), 2219 deletions(-)
+
 
 User api additions
 ------------------
@@ -10,10 +103,34 @@ User api additions
         "1.1 9e7f737", representing the library version from configure.ac
         and the git HEAD hash the library was built from
 
+ - TCP Keepalive can now optionally be applied to all lws sockets, on Linux
+       also with controllable timeout, number of probes and probe interval.
+       (On BSD type OS, you can only use system default settings for the
+       timing and retries, although enabling it is supported by setting
+       ka_time to nonzero, the exact value has no meaning.)
+       This enables detection of idle connections which are logically okay,
+       but are in fact dead, due to network connectivity issues at the server,
+       client, or any intermediary.  By default it's not enabled, but you
+       can enable it by setting a non-zero timeout (in seconds) at the new
+       ka_time member at context creation time.
+
+ - Two new optional user callbacks added, LWS_CALLBACK_PROTOCOL_DESTROY which
+       is called one-time per protocol as the context is being destroyed, and
+       LWS_CALLBACK_PROTOCOL_INIT which is called when the context is created
+       and the protocols are added, again it's a one-time affair.
+       This lets you manage per-protocol allocations properly including
+       cleaning up after yourself when the server goes down.
 
 User api changes
 ----------------
 
+ - libwebsocket_create_context() has changed from taking a ton of parameters
+       to just taking a pointer to a struct containing the parameters.  The
+       struct lws_context_creation_info is in libwebsockets.h, the members
+       are in the same order as when they were parameters to the call
+       previously.  The test apps are all updated accordingly so you can
+       see example code there.
+
  - Header tokens are now deleted after the websocket connection is
        established.  Not just the header data is saved, but the pointer and
        length array is also removed from (union) scope saving several hundred
@@ -36,26 +153,74 @@ User api changes
        By correctly setting this, you can save a lot of memory when your
        protocol has small frames (see the test server and client sources).
 
+ - LWS_MAX_HEADER_LEN now defaults to 1024 and is the total amount of known
+       header payload lws can cope with, that includes the GET URL, origin
+       etc.  Headers not understood by lws are ignored and their payload
+       not included in this.
+
 
 User api removals
 -----------------
 
-The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
-buffer size chosen per-protocol.  For compatibility, there's a default of
-4096 rx buffer, but user code should set the appropriate size for the
-protocol frames.
+ - The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
+       buffer size chosen per-protocol.  For compatibility, there's a default
+       of 4096 rx buffer, but user code should set the appropriate size for
+       the protocol frames.
+
+ - LWS_INITIAL_HDR_ALLOC and LWS_ADDITIONAL_HDR_ALLOC are no longer needed
+       and have been removed.  There's a new header management scheme that
+       handles them in a much more compact way.
+
+ - libwebsockets_hangup_on_client() is removed.  If you want to close the
+       connection you must do so from the user callback and by returning
+       -1 from there.
+
+ - libwebsocket_close_and_free_session() is now private to the library code
+       only and not exposed for user code.  If you want to close the
+       connection, you must do so from the user callback by returning -1
+       from there.
 
 
 New features
 ------------
 
  - Cmake project file added, aimed initially at Windows support: this replaces
-the visual studio project files that were in the tree until now.
+       the visual studio project files that were in the tree until now.
+
+ - CyaSSL now supported in place of OpenSSL (--use-cyassl on configure)
 
  - PATH_MAX or MAX_PATH no longer needed
 
  - cutomizable frame rx buffer size by protocol
 
+ - optional TCP keepalive so dead peers can be detected, can be enabled at
+       context-creation time
+
+ - valgrind-clean: no SSL or CyaSSL: completely clean.  With OpenSSL, 88 bytes
+       lost at OpenSSL library init and symptomless reports of uninitialized
+       memory usage... seems to be a known and ignored problem at OpenSSL
+
+ - By default debug is enabled and the library is built for -O0 -g to faclitate
+       that.  Use --disable-debug configure option to build instead with -O4
+       and no -g (debug info), obviously providing best performance and
+       reduced binary size.
+
+ - 1.0 introduced some code to try to not deflate small frames, however this
+       seems to break when confronted with a mixture of frames above and
+       below the threshold, so it's removed.  Veto the compression extension
+       in your user callback if you will typically have very small frames.
+
+ - There are many memory usage improvements, both a reduction in malloc/
+       realloc and architectural changes.  A websocket connection now
+       consumes only 296 bytes with SSL or 272 bytes without on x86_64,
+       during header processing an additional 1262 bytes is allocated in a
+       single malloc, but is freed when the websocket connection starts.
+       The RX frame buffer defined by the protocol in user
+       code is also allocated per connection, this represents the largest
+       frame you can receive atomically in that protocol.
+
+ - On ARM9 build, just http+ws server no extensions or ssl, <12Kbytes .text
+       and 112 bytes per connection (+1328 only during header processing)
 
 
 v1.1-chrome26-firefox18