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