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