Bugfix compiling for cross compiling.
[profile/ivi/libwebsockets.git] / changelog
1 Changelog
2 ---------
3
4 (development since 1.22)
5
6 User api additions
7 ------------------
8
9  - You can now call libwebsocket_callback_on_writable() on http connectons,
10         and get a LWS_CALLBACK_HTTP_WRITEABLE callback, the same way you can
11         regulate writes with a websocket protocol connection.
12
13 User api changes
14 ----------------
15
16  - the external poll callbacks now get the socket descriptor coming from the
17         "in" parameter.  The user parameter provides the user_space for the
18         wsi as it normally does on the other callbacks.
19         LWS_CALLBACK_FILTER_NETWORK_CONNECTION also has the socket descriptor
20         delivered by @in now instead of @user.
21
22
23 User api removal
24 ----------------
25
26  - libwebsocket_ensure_user_space() is removed from the public api, if you
27         were using it to get user_space, you need to adapt your code to only
28         use user_space inside the user callback.
29
30
31 v1.21-chrome26-firefox18
32 ========================
33
34  - Fixes buffer overflow bug in max frame size handling if you used the
35         default protocol buffer size.  If you declared rx_buffer_size in your
36         protocol, which is recommended anyway, your code was unaffected.
37
38 v1.2-chrome26-firefox18
39 =======================
40
41 Diffstat
42 --------
43
44  .gitignore                                                      |  16 +++
45  CMakeLists.txt                                                  | 544 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
46  LICENSE                                                         | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
47  Makefile.am                                                     |   1 +
48  README                                                          |  20 +++
49  README.build                                                    | 258 ++++++++++++++++++++++++++++++++-----
50  README.coding                                                   |  52 ++++++++
51  changelog                                                       | 136 ++++++++++++++++++++
52  cmake/FindOpenSSLbins.cmake                                     |  33 +++++
53  config.h.cmake                                                  | 173 +++++++++++++++++++++++++
54  configure.ac                                                    |  22 +++-
55  lib/Makefile.am                                                 |  20 ++-
56  lib/base64-decode.c                                             |   2 +-
57  lib/client-handshake.c                                          | 190 +++++++++++-----------------
58  lib/client-parser.c                                             |  88 +++++++------
59  lib/client.c                                                    | 384 ++++++++++++++++++++++++++++++-------------------------
60  lib/daemonize.c                                                 |  32 +++--
61  lib/extension-deflate-frame.c                                   |  58 +++++----
62  lib/extension-deflate-stream.c                                  |  19 ++-
63  lib/extension-deflate-stream.h                                  |   4 +-
64  lib/extension.c                                                 |  11 +-
65  lib/getifaddrs.c                                                | 315 +++++++++++++++++++++++-----------------------
66  lib/getifaddrs.h                                                |  30 ++---
67  lib/handshake.c                                                 | 124 +++++++++++-------
68  lib/libwebsockets.c                                             | 736 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
69  lib/libwebsockets.h                                             | 237 ++++++++++++++++++++++------------
70  lib/output.c                                                    | 192 +++++++++++-----------------
71  lib/parsers.c                                                   | 966 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------
72  lib/private-libwebsockets.h                                     | 225 +++++++++++++++++++++------------
73  lib/server-handshake.c                                          |  82 ++++++------
74  lib/server.c                                                    |  96 +++++++-------
75  libwebsockets-api-doc.html                                      | 189 ++++++++++++++++++----------
76  libwebsockets.spec                                              |  17 +--
77  test-server/attack.sh                                           | 148 ++++++++++++++++++++++
78  test-server/test-client.c                                       | 125 +++++++++---------
79  test-server/test-echo.c                                         |  31 +++--
80  test-server/test-fraggle.c                                      |  32 ++---
81  test-server/test-ping.c                                         |  52 ++++----
82  test-server/test-server.c                                       | 129 ++++++++++++-------
83  win32port/libwebsocketswin32/libwebsocketswin32.vcxproj         | 279 ----------------------------------------
84  win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters |  23 +++-
85  41 files changed, 4398 insertions(+), 2219 deletions(-)
86
87
88 User api additions
89 ------------------
90
91  - lws_get_library_version() returns a const char * with a string like
92          "1.1 9e7f737", representing the library version from configure.ac
93          and the git HEAD hash the library was built from
94
95  - TCP Keepalive can now optionally be applied to all lws sockets, on Linux
96         also with controllable timeout, number of probes and probe interval.
97         (On BSD type OS, you can only use system default settings for the
98         timing and retries, although enabling it is supported by setting
99         ka_time to nonzero, the exact value has no meaning.)
100         This enables detection of idle connections which are logically okay,
101         but are in fact dead, due to network connectivity issues at the server,
102         client, or any intermediary.  By default it's not enabled, but you
103         can enable it by setting a non-zero timeout (in seconds) at the new
104         ka_time member at context creation time.
105
106  - Two new optional user callbacks added, LWS_CALLBACK_PROTOCOL_DESTROY which
107         is called one-time per protocol as the context is being destroyed, and
108         LWS_CALLBACK_PROTOCOL_INIT which is called when the context is created
109         and the protocols are added, again it's a one-time affair.
110         This lets you manage per-protocol allocations properly including
111         cleaning up after yourself when the server goes down.
112
113 User api changes
114 ----------------
115
116  - libwebsocket_create_context() has changed from taking a ton of parameters
117         to just taking a pointer to a struct containing the parameters.  The
118         struct lws_context_creation_info is in libwebsockets.h, the members
119         are in the same order as when they were parameters to the call
120         previously.  The test apps are all updated accordingly so you can
121         see example code there.
122
123  - Header tokens are now deleted after the websocket connection is
124         established.  Not just the header data is saved, but the pointer and
125         length array is also removed from (union) scope saving several hundred
126         bytes per connection once it is established
127
128  - struct libwebsocket_protocols has a new member rx_buffer_size, this
129         controls rx buffer size per connection of that protocol now.  Sources
130         for apps built against older versions of the library won't declare
131         this in their protocols, defaulting it to 0.  Zero buffer is legal,
132         it causes a default buffer to be allocated (currently 4096)
133
134         If you want to receive only atomic frames in your user callback, you
135         should set this to greater than your largest frame size.  If a frame
136         comes that exceeds that, no error occurs but the callback happens as
137         soon as the buffer limit is reached, and again if it is reached again
138         or the frame completes.  You can detect that has happened by seeing
139         there is still frame content pending using
140         libwebsockets_remaining_packet_payload()
141
142         By correctly setting this, you can save a lot of memory when your
143         protocol has small frames (see the test server and client sources).
144
145  - LWS_MAX_HEADER_LEN now defaults to 1024 and is the total amount of known
146         header payload lws can cope with, that includes the GET URL, origin
147         etc.  Headers not understood by lws are ignored and their payload
148         not included in this.
149
150
151 User api removals
152 -----------------
153
154  - The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
155         buffer size chosen per-protocol.  For compatibility, there's a default
156         of 4096 rx buffer, but user code should set the appropriate size for
157         the protocol frames.
158
159  - LWS_INITIAL_HDR_ALLOC and LWS_ADDITIONAL_HDR_ALLOC are no longer needed
160         and have been removed.  There's a new header management scheme that
161         handles them in a much more compact way.
162
163  - libwebsockets_hangup_on_client() is removed.  If you want to close the
164         connection you must do so from the user callback and by returning
165         -1 from there.
166
167  - libwebsocket_close_and_free_session() is now private to the library code
168         only and not exposed for user code.  If you want to close the
169         connection, you must do so from the user callback by returning -1
170         from there.
171
172
173 New features
174 ------------
175
176  - Cmake project file added, aimed initially at Windows support: this replaces
177         the visual studio project files that were in the tree until now.
178
179  - CyaSSL now supported in place of OpenSSL (--use-cyassl on configure)
180
181  - PATH_MAX or MAX_PATH no longer needed
182
183  - cutomizable frame rx buffer size by protocol
184
185  - optional TCP keepalive so dead peers can be detected, can be enabled at
186         context-creation time
187
188  - valgrind-clean: no SSL or CyaSSL: completely clean.  With OpenSSL, 88 bytes
189         lost at OpenSSL library init and symptomless reports of uninitialized
190         memory usage... seems to be a known and ignored problem at OpenSSL
191
192  - By default debug is enabled and the library is built for -O0 -g to faclitate
193         that.  Use --disable-debug configure option to build instead with -O4
194         and no -g (debug info), obviously providing best performance and
195         reduced binary size.
196
197  - 1.0 introduced some code to try to not deflate small frames, however this
198         seems to break when confronted with a mixture of frames above and
199         below the threshold, so it's removed.  Veto the compression extension
200         in your user callback if you will typically have very small frames.
201
202  - There are many memory usage improvements, both a reduction in malloc/
203         realloc and architectural changes.  A websocket connection now
204         consumes only 296 bytes with SSL or 272 bytes without on x86_64,
205         during header processing an additional 1262 bytes is allocated in a
206         single malloc, but is freed when the websocket connection starts.
207         The RX frame buffer defined by the protocol in user
208         code is also allocated per connection, this represents the largest
209         frame you can receive atomically in that protocol.
210
211  - On ARM9 build, just http+ws server no extensions or ssl, <12Kbytes .text
212         and 112 bytes per connection (+1328 only during header processing)
213
214
215 v1.1-chrome26-firefox18
216 =======================
217
218 Diffstat
219 --------
220
221  Makefile.am                            |    4 +
222  README-test-server                     |  291 ---
223  README.build                           |  239 ++
224  README.coding                          |  138 ++
225  README.rst                             |   72 -
226  README.test-apps                       |  272 +++
227  configure.ac                           |  116 +-
228  lib/Makefile.am                        |   55 +-
229  lib/base64-decode.c                    |    5 +-
230  lib/client-handshake.c                 |  121 +-
231  lib/client-parser.c                    |  394 ++++
232  lib/client.c                           |  807 +++++++
233  lib/daemonize.c                        |  212 ++
234  lib/extension-deflate-frame.c          |  132 +-
235  lib/extension-deflate-stream.c         |   12 +-
236  lib/extension-x-google-mux.c           | 1223 ----------
237  lib/extension-x-google-mux.h           |   96 -
238  lib/extension.c                        |    8 -
239  lib/getifaddrs.c                       |  271 +++
240  lib/getifaddrs.h                       |   76 +
241  lib/handshake.c                        |  582 +----
242  lib/libwebsockets.c                    | 2493 ++++++---------------
243  lib/libwebsockets.h                    |  115 +-
244  lib/md5.c                              |  217 --
245  lib/minilex.c                          |  440 ++++
246  lib/output.c                           |  628 ++++++
247  lib/parsers.c                          | 2016 +++++------------
248  lib/private-libwebsockets.h            |  284 +--
249  lib/server-handshake.c                 |  275 +++
250  lib/server.c                           |  377 ++++
251  libwebsockets-api-doc.html             |  300 +--
252  m4/ignore-me                           |    2 +
253  test-server/Makefile.am                |  111 +-
254  test-server/libwebsockets.org-logo.png |  Bin 0 -> 7029 bytes
255  test-server/test-client.c              |   45 +-
256  test-server/test-echo.c                |  330 +++
257  test-server/test-fraggle.c             |   20 +-
258  test-server/test-ping.c                |   22 +-
259  test-server/test-server-extpoll.c      |  554 -----
260  test-server/test-server.c              |  349 ++-
261  test-server/test.html                  |    3 +-
262  win32port/zlib/ZLib.vcxproj            |  749 ++++---
263  win32port/zlib/ZLib.vcxproj.filters    |  188 +-
264  win32port/zlib/adler32.c               |  348 ++-
265  win32port/zlib/compress.c              |  160 +-
266  win32port/zlib/crc32.c                 |  867 ++++----
267  win32port/zlib/crc32.h                 |  882 ++++----
268  win32port/zlib/deflate.c               | 3799 +++++++++++++++-----------------
269  win32port/zlib/deflate.h               |  688 +++---
270  win32port/zlib/gzclose.c               |   50 +-
271  win32port/zlib/gzguts.h                |  325 ++-
272  win32port/zlib/gzlib.c                 | 1157 +++++-----
273  win32port/zlib/gzread.c                | 1242 ++++++-----
274  win32port/zlib/gzwrite.c               | 1096 +++++----
275  win32port/zlib/infback.c               | 1272 ++++++-----
276  win32port/zlib/inffast.c               |  680 +++---
277  win32port/zlib/inffast.h               |   22 +-
278  win32port/zlib/inffixed.h              |  188 +-
279  win32port/zlib/inflate.c               | 2976 +++++++++++++------------
280  win32port/zlib/inflate.h               |  244 +-
281  win32port/zlib/inftrees.c              |  636 +++---
282  win32port/zlib/inftrees.h              |  124 +-
283  win32port/zlib/trees.c                 | 2468 +++++++++++----------
284  win32port/zlib/trees.h                 |  256 +--
285  win32port/zlib/uncompr.c               |  118 +-
286  win32port/zlib/zconf.h                 |  934 ++++----
287  win32port/zlib/zlib.h                  | 3357 ++++++++++++++--------------
288  win32port/zlib/zutil.c                 |  642 +++---
289  win32port/zlib/zutil.h                 |  526 ++---
290  69 files changed, 19556 insertions(+), 20145 deletions(-)
291
292 user api changes
293 ----------------
294
295  - libwebsockets_serve_http_file() now takes a context as first argument
296
297  - libwebsockets_get_peer_addresses() now takes a context and wsi as first
298         two arguments
299
300
301 user api additions
302 ------------------
303
304  - lwsl_...() logging apis, default to stderr but retargetable by user code;
305         may be used also by user code
306
307  - lws_set_log_level() set which logging apis are able to emit (defaults to
308         notice, warn, err severities), optionally set the emit callback
309
310  - lwsl_emit_syslog() helper callback emits to syslog
311
312  - lws_daemonize() helper code that forks the app into a headless daemon
313         properly, maintains a lock file with pid in suitable for sysvinit etc to
314         control lifecycle
315
316  - LWS_CALLBACK_HTTP_FILE_COMPLETION callback added since http file
317         transfer is now asynchronous (see test server code)
318
319  - lws_frame_is_binary() from a wsi pointer, let you know if the received
320         data was sent in BINARY mode
321
322
323 user api removals
324 -----------------
325
326  - libwebsockets_fork_service_loop() - no longer supported (had intractable problems)
327         arrange your code to act from the user callback instead from same
328         process context as the service loop
329
330  - libwebsockets_broadcast() - use libwebsocket_callback_on_writable[_all_protocol]()
331         instead from same process context as the service loop.  See the test apps
332         for examples.
333
334  - x-google-mux() removed until someone wants it
335
336  - pre -v13 (ancient) protocol support removed
337
338
339 New features
340 ------------
341
342  - echo test server and client compatible with echo.websocket.org added
343
344  - many new configure options (see README.build) to reduce footprint of the
345         library to what you actually need, eg, --without-client and
346         --without-server
347
348  - http + websocket server can build to as little as 12K .text for ARM
349
350  - no more MAX_CLIENTS limitation; adapts to support the max number of fds
351         allowed to the process by ulimit, defaults to 1024 on Fedora and
352         Ubuntu.  Use ulimit to control this without needing to configure
353         the library.  Code here is smaller and faster.
354
355  - adaptive ratio of listen socket to connection socket service allows
356         good behaviour under Apache ab test load.  Tested with thousands
357         of simultaneous connections
358
359  - reduction in per-connection memory footprint by moving to a union to hold
360         mutually-exclusive state for the connection
361
362  - robustness: Out of Memory taken care of for all allocation code now
363
364  - internal getifaddrs option if your toolchain lacks it (some uclibc)
365
366  - configurable memory limit for deflate operations
367
368  - improvements in SSL code nonblocking operation, possible hang solved,
369         some SSL operations broken down into pollable states so there is
370         no library blocking, timeout coverage for SSL_connect
371
372  - extpoll test server merged into single test server source
373
374  - robustness: library should deal with all recoverable socket conditions
375
376  - rx flowcontrol for backpressure notification fixed and implmeneted
377         correctly in the test server
378
379  - optimal lexical parser added for header processing; all headers in a
380         single 276-byte state table
381
382  - latency tracking api added (configure --with-latency)
383
384  - Improved in-tree documentation, REAME.build, README.coding,
385         README.test-apps, changelog
386
387  - Many small fixes
388
389
390 v1.0-chrome25-firefox17 (6cd1ea9b005933f)