blob: e3166c2aea61721c566b76903675a4e89b14b1d5 [file] [log] [blame]
Andy Greena35c86f2013-01-31 10:16:44 +08001Changelog
2---------
3
Olehfaeac3c2014-07-29 23:18:41 +08004(post-1.3)
5==========
6
7User api additions
8------------------
9
10There's a new member in the info struct used to control context creation,
11ssl_private_key_password, which allows passing into lws the passphrase on
12an SSL cetificate
13
14
Andy Greenc1fdd102014-07-06 09:56:11 +080015v1.3-chrome37-firefox30
16=======================
17
18 .gitignore | 1 -
19 CMakeLists.txt | 447 +++--
20 README.build | 35 +-
21 README.coding | 14 +
22 changelog | 66 +
23 cmake/LibwebsocketsConfig.cmake.in | 17 +
24 cmake/LibwebsocketsConfigVersion.cmake.in | 11 +
25 config.h.cmake | 18 +
26 cross-ming.cmake | 31 +
27 cross-openwrt-makefile | 91 +
28 lib/client-handshake.c | 205 ++-
29 lib/client-parser.c | 58 +-
30 lib/client.c | 158 +-
31 lib/context.c | 341 ++++
32 lib/extension-deflate-frame.c | 2 +-
33 lib/extension.c | 178 ++
34 lib/handshake.c | 287 +---
35 lib/lextable.h | 338 ++++
36 lib/libev.c | 175 ++
37 lib/libwebsockets.c | 2089 +++--------------------
38 lib/libwebsockets.h | 253 ++-
39 lib/lws-plat-unix.c | 404 +++++
40 lib/lws-plat-win.c | 358 ++++
41 lib/minilex.c | 530 +++---
42 lib/output.c | 445 ++---
43 lib/parsers.c | 682 ++++----
44 lib/pollfd.c | 239 +++
45 lib/private-libwebsockets.h | 501 +++++-
46 lib/server-handshake.c | 274 +--
47 lib/server.c | 858 ++++++++--
48 lib/service.c | 517 ++++++
49 lib/sha-1.c | 38 +-
50 lib/ssl-http2.c | 78 +
51 lib/ssl.c | 571 +++++++
52 test-server/attack.sh | 101 +-
53 test-server/test-client.c | 9 +-
54 test-server/test-echo.c | 17 +-
55 test-server/test-fraggle.c | 7 -
56 test-server/test-ping.c | 12 +-
57 test-server/test-server.c | 330 ++--
58 test-server/test.html | 4 +-
59 win32port/client/client.vcxproj | 259 ---
60 win32port/client/client.vcxproj.filters | 39 -
61 .../libwebsocketswin32.vcxproj.filters | 93 -
62 win32port/server/server.vcxproj | 276 ---
63 win32port/server/server.vcxproj.filters | 51 -
64 win32port/win32helpers/gettimeofday.h | 59 +-
65 win32port/win32helpers/netdb.h | 1 -
66 win32port/win32helpers/strings.h | 0
67 win32port/win32helpers/sys/time.h | 1 -
68 win32port/win32helpers/unistd.h | 0
69 win32port/win32helpers/websock-w32.c | 104 --
70 win32port/win32helpers/websock-w32.h | 62 -
71 win32port/win32port.sln | 100 --
72 win32port/zlib/gzio.c | 3 +-
73 55 files changed, 6779 insertions(+), 5059 deletions(-)
74
Andy Green79002562013-11-09 11:04:35 +080075
kapejodce64fb02013-11-19 13:38:16 +010076User api additions
77------------------
78
79POST method is supported
80
81The protocol 0 / HTTP callback can now get two new kinds of callback,
82LWS_CALLBACK_HTTP_BODY (in and len are a chunk of the body of the HTTP request)
83and LWS_CALLBACK_HTTP_BODY_COMPLETION (the expected amount of body has arrived
84and been passed to the user code already). These callbacks are used with the
85post method (see the test server for details).
86
87The period between the HTTP header completion and the completion of the body
88processing is protected by a 5s timeout.
89
90The chunks are stored in a malloc'd buffer of size protocols[0].rx_buffer_size.
91
92
James Devine5b34c972013-12-14 11:41:29 +080093New server option you can enable from user code
94LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT allows non-SSL connections to
95also be accepted on an SSL listening port. It's disabled unless you enable
96it explicitly.
97
98
Andy Green7a132792013-12-18 09:48:26 +080099Two new callbacks are added in protocols[0] that are optional for allowing
100limited thread access to libwebsockets, LWS_CALLBACK_LOCK_POLL and
101LWS_CALLBACK_UNLOCK_POLL.
102
103If you use them, they protect internal and external poll list changes, but if
104you want to use external thread access to libwebsocket_callback_on_writable()
105you have to implement your locking here even if you don't use external
106poll support.
107
108If you will use another thread for this, take a lot of care about managing
109your list of live wsi by doing it from ESTABLISHED and CLOSED callbacks
110(with your own locking).
111
Andrew Canaday9769f4f2014-03-23 13:25:07 +0800112If you configure cmake with -DLWS_WITH_LIBEV=1 then the code allowing the libev
113eventloop instead of the default poll() one will also be compiled in. But to
114use it, you must also set the LWS_SERVER_OPTION_LIBEV flag on the context
115creation info struct options member.
Andy Green7a132792013-12-18 09:48:26 +0800116
Andy Greenc1fdd102014-07-06 09:56:11 +0800117IPV6 is supported and enabled by default except for Windows, you can disable
118the support at build-time by giving -DLWS_IPV6=, and disable use of it even if
James Devine3f13ea22014-03-24 16:09:25 +0800119compiled in by making sure the flag LWS_SERVER_OPTION_DISABLE_IPV6 is set on
120the context creation info struct options member.
121
Andy Greenc1fdd102014-07-06 09:56:11 +0800122You can give LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS option flag to
123guarantee the OS CAs will not be used, even if that support was selected at
124build-time.
125
126Optional "token limits" may be enforced by setting the member "token_limits"
127in struct lws_context_creation_info to point to a struct lws_token_limits.
128NULL means no token limits used for compatibility.
129
Andy Green7a132792013-12-18 09:48:26 +0800130
Andy Green79002562013-11-09 11:04:35 +0800131User api changes
132----------------
133
134Extra optional argument to libwebsockets_serve_http_file() allows injecion
135of HTTP headers into the canned response. Eg, cookies may be added like
136that without getting involved in having to send the header by hand.
137
Patrick Gansterer148b9452014-02-28 02:31:23 +0100138A new info member http_proxy_address may be used at context creation time to
139set the http proxy. If non-NULL, it overrides http_proxy environment var.
Andy Green79002562013-11-09 11:04:35 +0800140
Andy Greend2ec7ad2014-03-15 10:39:29 +0800141Cmake supports LWS_SSL_CLIENT_USE_OS_CA_CERTS defaulting to on, which gets
142the client to use the OS CA Roots. If you're worried somebody with the
143ability to forge for force creation of a client cert from the root CA in
144your OS, you should disable this since your selfsigned $0 cert is a lot safer
145then...
146
Andy Green79002562013-11-09 11:04:35 +0800147
Andy Green81877e62013-10-26 20:36:08 +0800148v1.23-chrome32-firefox24
149========================
150
151 Android.mk | 29 +
152 CMakeLists.txt | 573 ++++++++----
153 COPYING | 503 -----------
154 INSTALL | 365 --------
155 Makefile.am | 13 -
156 README.build | 371 ++------
157 README.coding | 63 ++
158 autogen.sh | 1578 ---------------------------------
159 changelog | 69 ++
160 cmake/FindGit.cmake | 163 ++++
161 cmake/FindOpenSSLbins.cmake | 15 +-
162 cmake/UseRPMTools.cmake | 176 ++++
163 config.h.cmake | 25 +-
164 configure.ac | 226 -----
165 cross-arm-linux-gnueabihf.cmake | 28 +
166 lib/Makefile.am | 89 --
167 lib/base64-decode.c | 98 +-
168 lib/client-handshake.c | 123 ++-
169 lib/client-parser.c | 19 +-
170 lib/client.c | 145 ++-
171 lib/daemonize.c | 4 +-
172 lib/extension.c | 2 +-
173 lib/getifaddrs.h | 4 +-
174 lib/handshake.c | 76 +-
175 lib/libwebsockets.c | 491 ++++++----
176 lib/libwebsockets.h | 164 ++--
177 lib/output.c | 214 ++++-
178 lib/parsers.c | 102 +--
179 lib/private-libwebsockets.h | 66 +-
180 lib/server-handshake.c | 5 +-
181 lib/server.c | 29 +-
182 lib/sha-1.c | 2 +-
183 libwebsockets-api-doc.html | 249 +++---
184 libwebsockets.pc.in | 11 -
185 libwebsockets.spec | 14 +-
186 m4/ignore-me | 2 -
187 scripts/FindLibWebSockets.cmake | 33 +
188 scripts/kernel-doc | 1 +
189 test-server/Makefile.am | 131 ---
190 test-server/leaf.jpg | Bin 0 -> 2477518 bytes
191 test-server/test-client.c | 78 +-
192 test-server/test-echo.c | 33 +-
193 test-server/test-fraggle.c | 26 +-
194 test-server/test-ping.c | 15 +-
195 test-server/test-server.c | 197 +++-
196 test-server/test.html | 5 +-
197 win32port/win32helpers/gettimeofday.c | 74 +-
198 win32port/win32helpers/websock-w32.h | 6 +-
199 48 files changed, 2493 insertions(+), 4212 deletions(-)
200
Andy Green54cb3462013-02-14 22:23:54 +0800201
202User api additions
203------------------
204
205 - You can now call libwebsocket_callback_on_writable() on http connectons,
206 and get a LWS_CALLBACK_HTTP_WRITEABLE callback, the same way you can
207 regulate writes with a websocket protocol connection.
208
Andy Green2672fb22013-02-22 09:54:35 +0800209 - A new member in the context creation parameter struct "ssl_cipher_list" is
210 added, replacing CIPHERS_LIST_STRING. NULL means use the ssl library
211 default list of ciphers.
212
Andy Green58f214e2013-03-09 13:03:53 +0800213 - Not really an api addition, but libwebsocket_service_fd() will now zero
214 the revents field of the pollfd it was called with if it handled the
215 descriptor. So you can tell if it is a non-lws fd by checking revents
216 after the service call... if it's still nonzero, the descriptor
217 belongs to you and you need to take care of it.
218
Andy Greenb55451c2013-03-16 12:32:27 +0800219 - libwebsocket_rx_flow_allow_all_protocol(protocol) will unthrottle all
220 connections with the established protocol. It's designed to be
221 called from user server code when it sees it can accept more input
222 and may have throttled connections using the server rx flow apis
223 while it was unable to accept any other input The user server code
224 then does not have to try to track while connections it choked, this
225 will free up all of them in one call.
226
Andy Green0c9563b2013-06-10 22:54:40 +0800227 - there's a new, optional callback LWS_CALLBACK_CLOSED_HTTP which gets
228 called when an HTTP protocol socket closes
229
Andy Green96d48fd2013-09-18 08:32:55 +0800230 - for LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION callback, the user_space alloc
231 has already been done before the callback happens. That means we can
232 use the user parameter to the callback to contain the user pointer, and
233 move the protocol name to the "in" parameter. The docs for this
234 callback are also updated to reflect how to check headers in there.
235
Andy Green5dc62ea2013-09-20 20:26:12 +0800236 - libwebsocket_client_connect() is now properly nonblocking and async. See
237 README.coding and test-client.c for information on the callbacks you
238 can rely on controlling the async connection period with.
239
Andy Green81877e62013-10-26 20:36:08 +0800240 - if your OS does not support the http_proxy environment variable convention
241 (eg, reportedly OSX), you can use a new api libwebsocket_set_proxy()
242 to set the proxy details inbetween context creation and the connection
243 action. For OSes that support http_proxy, that's used automatically.
Andy Greenb55451c2013-03-16 12:32:27 +0800244
Andy Green50097dd2013-02-15 22:36:30 +0800245User api changes
246----------------
247
248 - the external poll callbacks now get the socket descriptor coming from the
249 "in" parameter. The user parameter provides the user_space for the
250 wsi as it normally does on the other callbacks.
Edwin van den Oetelaar8c8a8e12013-02-20 20:56:59 +0800251 LWS_CALLBACK_FILTER_NETWORK_CONNECTION also has the socket descriptor
252 delivered by @in now instead of @user.
Andy Green50097dd2013-02-15 22:36:30 +0800253
Andy Greenfc7c5e42013-02-23 10:50:10 +0800254 - libwebsocket_write() now returns -1 for error, or the amount of data
255 actually accepted for send. Under load, the OS may signal it is
256 ready to send new data on the socket, but have only a restricted
257 amount of memory to buffer the packet compared to usual.
258
Andy Green50097dd2013-02-15 22:36:30 +0800259
Andy Greendc914cf2013-02-18 16:54:26 +0800260User api removal
261----------------
262
263 - libwebsocket_ensure_user_space() is removed from the public api, if you
264 were using it to get user_space, you need to adapt your code to only
265 use user_space inside the user callback.
266
Andy Green2672fb22013-02-22 09:54:35 +0800267 - CIPHERS_LIST_STRING is removed
268
Andy Green0097a992013-03-09 13:06:37 +0800269 - autotools build has been removed. See README.build for info on how to
270 use CMake for your platform
271
Andy Green54cb3462013-02-14 22:23:54 +0800272
Andy Green53a46782013-02-14 11:23:49 +0800273v1.21-chrome26-firefox18
274========================
275
276 - Fixes buffer overflow bug in max frame size handling if you used the
277 default protocol buffer size. If you declared rx_buffer_size in your
278 protocol, which is recommended anyway, your code was unaffected.
279
Andy Green182cb9a2013-02-13 11:54:08 +0800280v1.2-chrome26-firefox18
281=======================
282
283Diffstat
284--------
285
286 .gitignore | 16 +++
287 CMakeLists.txt | 544 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
288 LICENSE | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
289 Makefile.am | 1 +
290 README | 20 +++
291 README.build | 258 ++++++++++++++++++++++++++++++++-----
292 README.coding | 52 ++++++++
293 changelog | 136 ++++++++++++++++++++
294 cmake/FindOpenSSLbins.cmake | 33 +++++
295 config.h.cmake | 173 +++++++++++++++++++++++++
296 configure.ac | 22 +++-
297 lib/Makefile.am | 20 ++-
298 lib/base64-decode.c | 2 +-
299 lib/client-handshake.c | 190 +++++++++++-----------------
300 lib/client-parser.c | 88 +++++++------
301 lib/client.c | 384 ++++++++++++++++++++++++++++++-------------------------
302 lib/daemonize.c | 32 +++--
303 lib/extension-deflate-frame.c | 58 +++++----
304 lib/extension-deflate-stream.c | 19 ++-
305 lib/extension-deflate-stream.h | 4 +-
306 lib/extension.c | 11 +-
307 lib/getifaddrs.c | 315 +++++++++++++++++++++++-----------------------
308 lib/getifaddrs.h | 30 ++---
309 lib/handshake.c | 124 +++++++++++-------
310 lib/libwebsockets.c | 736 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
311 lib/libwebsockets.h | 237 ++++++++++++++++++++++------------
312 lib/output.c | 192 +++++++++++-----------------
313 lib/parsers.c | 966 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------
314 lib/private-libwebsockets.h | 225 +++++++++++++++++++++------------
315 lib/server-handshake.c | 82 ++++++------
316 lib/server.c | 96 +++++++-------
317 libwebsockets-api-doc.html | 189 ++++++++++++++++++----------
318 libwebsockets.spec | 17 +--
319 test-server/attack.sh | 148 ++++++++++++++++++++++
320 test-server/test-client.c | 125 +++++++++---------
321 test-server/test-echo.c | 31 +++--
322 test-server/test-fraggle.c | 32 ++---
323 test-server/test-ping.c | 52 ++++----
324 test-server/test-server.c | 129 ++++++++++++-------
325 win32port/libwebsocketswin32/libwebsocketswin32.vcxproj | 279 ----------------------------------------
326 win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters | 23 +++-
327 41 files changed, 4398 insertions(+), 2219 deletions(-)
328
Andy Green7b405452013-02-01 10:50:15 +0800329
330User api additions
331------------------
332
333 - lws_get_library_version() returns a const char * with a string like
334 "1.1 9e7f737", representing the library version from configure.ac
335 and the git HEAD hash the library was built from
336
Andy Greena47865f2013-02-10 09:39:47 +0800337 - TCP Keepalive can now optionally be applied to all lws sockets, on Linux
338 also with controllable timeout, number of probes and probe interval.
339 (On BSD type OS, you can only use system default settings for the
340 timing and retries, although enabling it is supported by setting
341 ka_time to nonzero, the exact value has no meaning.)
342 This enables detection of idle connections which are logically okay,
343 but are in fact dead, due to network connectivity issues at the server,
Andy Greena690cd02013-02-09 12:25:31 +0800344 client, or any intermediary. By default it's not enabled, but you
345 can enable it by setting a non-zero timeout (in seconds) at the new
346 ka_time member at context creation time.
347
Andy Greena7109e62013-02-11 12:05:54 +0800348 - Two new optional user callbacks added, LWS_CALLBACK_PROTOCOL_DESTROY which
349 is called one-time per protocol as the context is being destroyed, and
350 LWS_CALLBACK_PROTOCOL_INIT which is called when the context is created
351 and the protocols are added, again it's a one-time affair.
352 This lets you manage per-protocol allocations properly including
353 cleaning up after yourself when the server goes down.
Andy Green7b405452013-02-01 10:50:15 +0800354
Andy Greened334462013-02-07 21:14:33 +0800355User api changes
356----------------
357
Andy Green1b265272013-02-09 14:01:09 +0800358 - libwebsocket_create_context() has changed from taking a ton of parameters
359 to just taking a pointer to a struct containing the parameters. The
360 struct lws_context_creation_info is in libwebsockets.h, the members
361 are in the same order as when they were parameters to the call
362 previously. The test apps are all updated accordingly so you can
363 see example code there.
364
Andy Greened334462013-02-07 21:14:33 +0800365 - Header tokens are now deleted after the websocket connection is
Andy Green54495112013-02-06 21:10:16 +0900366 established. Not just the header data is saved, but the pointer and
367 length array is also removed from (union) scope saving several hundred
368 bytes per connection once it is established
369
370 - struct libwebsocket_protocols has a new member rx_buffer_size, this
371 controls rx buffer size per connection of that protocol now. Sources
372 for apps built against older versions of the library won't declare
373 this in their protocols, defaulting it to 0. Zero buffer is legal,
374 it causes a default buffer to be allocated (currently 4096)
375
376 If you want to receive only atomic frames in your user callback, you
377 should set this to greater than your largest frame size. If a frame
378 comes that exceeds that, no error occurs but the callback happens as
379 soon as the buffer limit is reached, and again if it is reached again
380 or the frame completes. You can detect that has happened by seeing
381 there is still frame content pending using
382 libwebsockets_remaining_packet_payload()
383
384 By correctly setting this, you can save a lot of memory when your
385 protocol has small frames (see the test server and client sources).
386
Andy Green16ab3182013-02-10 18:02:31 +0800387 - LWS_MAX_HEADER_LEN now defaults to 1024 and is the total amount of known
388 header payload lws can cope with, that includes the GET URL, origin
389 etc. Headers not understood by lws are ignored and their payload
390 not included in this.
391
Andy Green54495112013-02-06 21:10:16 +0900392
393User api removals
394-----------------
395
Andy Green16ab3182013-02-10 18:02:31 +0800396 - The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
397 buffer size chosen per-protocol. For compatibility, there's a default
398 of 4096 rx buffer, but user code should set the appropriate size for
399 the protocol frames.
400
401 - LWS_INITIAL_HDR_ALLOC and LWS_ADDITIONAL_HDR_ALLOC are no longer needed
402 and have been removed. There's a new header management scheme that
403 handles them in a much more compact way.
Andy Greened334462013-02-07 21:14:33 +0800404
Andy Green70edd6f2013-02-12 10:15:25 +0800405 - libwebsockets_hangup_on_client() is removed. If you want to close the
406 connection you must do so from the user callback and by returning
407 -1 from there.
408
Andy Green508946c2013-02-12 10:19:08 +0800409 - libwebsocket_close_and_free_session() is now private to the library code
410 only and not exposed for user code. If you want to close the
411 connection, you must do so from the user callback by returning -1
412 from there.
413
Andy Greened334462013-02-07 21:14:33 +0800414
Andy Greendf60b0c2013-02-06 19:57:12 +0900415New features
416------------
417
Andy Green9b09dc02013-02-08 12:48:36 +0800418 - Cmake project file added, aimed initially at Windows support: this replaces
Andy Green16ab3182013-02-10 18:02:31 +0800419 the visual studio project files that were in the tree until now.
Andy Greendf60b0c2013-02-06 19:57:12 +0900420
Andy Greenc3ef0d62013-02-12 10:50:49 +0800421 - CyaSSL now supported in place of OpenSSL (--use-cyassl on configure)
422
Andy Green9b09dc02013-02-08 12:48:36 +0800423 - PATH_MAX or MAX_PATH no longer needed
Andy Greendf60b0c2013-02-06 19:57:12 +0900424
Andy Green54495112013-02-06 21:10:16 +0900425 - cutomizable frame rx buffer size by protocol
426
Andy Greenc3ef0d62013-02-12 10:50:49 +0800427 - optional TCP keepalive so dead peers can be detected, can be enabled at
428 context-creation time
429
430 - valgrind-clean: no SSL or CyaSSL: completely clean. With OpenSSL, 88 bytes
431 lost at OpenSSL library init and symptomless reports of uninitialized
432 memory usage... seems to be a known and ignored problem at OpenSSL
433
Andy Greena3957ef2013-02-11 09:31:43 +0800434 - By default debug is enabled and the library is built for -O0 -g to faclitate
435 that. Use --disable-debug configure option to build instead with -O4
436 and no -g (debug info), obviously providing best performance and
437 reduced binary size.
Andy Green7b405452013-02-01 10:50:15 +0800438
Andy Green895d56d2013-02-11 09:32:53 +0800439 - 1.0 introduced some code to try to not deflate small frames, however this
440 seems to break when confronted with a mixture of frames above and
441 below the threshold, so it's removed. Veto the compression extension
442 in your user callback if you will typically have very small frames.
443
Andy Green16ab3182013-02-10 18:02:31 +0800444 - There are many memory usage improvements, both a reduction in malloc/
445 realloc and architectural changes. A websocket connection now
446 consumes only 296 bytes with SSL or 272 bytes without on x86_64,
447 during header processing an additional 1262 bytes is allocated in a
448 single malloc, but is freed when the websocket connection starts.
449 The RX frame buffer defined by the protocol in user
450 code is also allocated per connection, this represents the largest
451 frame you can receive atomically in that protocol.
452
Andy Greenc3ef0d62013-02-12 10:50:49 +0800453 - On ARM9 build, just http+ws server no extensions or ssl, <12Kbytes .text
454 and 112 bytes per connection (+1328 only during header processing)
455
Andy Green895d56d2013-02-11 09:32:53 +0800456
Andy Greenbd1132f2013-01-31 19:53:05 +0800457v1.1-chrome26-firefox18
Andy Greena35c86f2013-01-31 10:16:44 +0800458=======================
459
460Diffstat
461--------
462
463 Makefile.am | 4 +
464 README-test-server | 291 ---
465 README.build | 239 ++
466 README.coding | 138 ++
467 README.rst | 72 -
468 README.test-apps | 272 +++
469 configure.ac | 116 +-
470 lib/Makefile.am | 55 +-
471 lib/base64-decode.c | 5 +-
472 lib/client-handshake.c | 121 +-
473 lib/client-parser.c | 394 ++++
474 lib/client.c | 807 +++++++
475 lib/daemonize.c | 212 ++
476 lib/extension-deflate-frame.c | 132 +-
477 lib/extension-deflate-stream.c | 12 +-
478 lib/extension-x-google-mux.c | 1223 ----------
479 lib/extension-x-google-mux.h | 96 -
480 lib/extension.c | 8 -
481 lib/getifaddrs.c | 271 +++
482 lib/getifaddrs.h | 76 +
483 lib/handshake.c | 582 +----
484 lib/libwebsockets.c | 2493 ++++++---------------
485 lib/libwebsockets.h | 115 +-
486 lib/md5.c | 217 --
487 lib/minilex.c | 440 ++++
488 lib/output.c | 628 ++++++
489 lib/parsers.c | 2016 +++++------------
490 lib/private-libwebsockets.h | 284 +--
491 lib/server-handshake.c | 275 +++
492 lib/server.c | 377 ++++
493 libwebsockets-api-doc.html | 300 +--
494 m4/ignore-me | 2 +
495 test-server/Makefile.am | 111 +-
496 test-server/libwebsockets.org-logo.png | Bin 0 -> 7029 bytes
497 test-server/test-client.c | 45 +-
498 test-server/test-echo.c | 330 +++
499 test-server/test-fraggle.c | 20 +-
500 test-server/test-ping.c | 22 +-
501 test-server/test-server-extpoll.c | 554 -----
502 test-server/test-server.c | 349 ++-
503 test-server/test.html | 3 +-
504 win32port/zlib/ZLib.vcxproj | 749 ++++---
505 win32port/zlib/ZLib.vcxproj.filters | 188 +-
506 win32port/zlib/adler32.c | 348 ++-
507 win32port/zlib/compress.c | 160 +-
508 win32port/zlib/crc32.c | 867 ++++----
509 win32port/zlib/crc32.h | 882 ++++----
510 win32port/zlib/deflate.c | 3799 +++++++++++++++-----------------
511 win32port/zlib/deflate.h | 688 +++---
512 win32port/zlib/gzclose.c | 50 +-
513 win32port/zlib/gzguts.h | 325 ++-
514 win32port/zlib/gzlib.c | 1157 +++++-----
515 win32port/zlib/gzread.c | 1242 ++++++-----
516 win32port/zlib/gzwrite.c | 1096 +++++----
517 win32port/zlib/infback.c | 1272 ++++++-----
518 win32port/zlib/inffast.c | 680 +++---
519 win32port/zlib/inffast.h | 22 +-
520 win32port/zlib/inffixed.h | 188 +-
521 win32port/zlib/inflate.c | 2976 +++++++++++++------------
522 win32port/zlib/inflate.h | 244 +-
523 win32port/zlib/inftrees.c | 636 +++---
524 win32port/zlib/inftrees.h | 124 +-
525 win32port/zlib/trees.c | 2468 +++++++++++----------
526 win32port/zlib/trees.h | 256 +--
527 win32port/zlib/uncompr.c | 118 +-
528 win32port/zlib/zconf.h | 934 ++++----
529 win32port/zlib/zlib.h | 3357 ++++++++++++++--------------
530 win32port/zlib/zutil.c | 642 +++---
531 win32port/zlib/zutil.h | 526 ++---
532 69 files changed, 19556 insertions(+), 20145 deletions(-)
533
534user api changes
535----------------
536
537 - libwebsockets_serve_http_file() now takes a context as first argument
538
539 - libwebsockets_get_peer_addresses() now takes a context and wsi as first
540 two arguments
541
542
543user api additions
544------------------
545
546 - lwsl_...() logging apis, default to stderr but retargetable by user code;
547 may be used also by user code
548
549 - lws_set_log_level() set which logging apis are able to emit (defaults to
550 notice, warn, err severities), optionally set the emit callback
551
552 - lwsl_emit_syslog() helper callback emits to syslog
553
554 - lws_daemonize() helper code that forks the app into a headless daemon
555 properly, maintains a lock file with pid in suitable for sysvinit etc to
556 control lifecycle
557
558 - LWS_CALLBACK_HTTP_FILE_COMPLETION callback added since http file
559 transfer is now asynchronous (see test server code)
560
561 - lws_frame_is_binary() from a wsi pointer, let you know if the received
562 data was sent in BINARY mode
563
564
565user api removals
566-----------------
567
568 - libwebsockets_fork_service_loop() - no longer supported (had intractable problems)
569 arrange your code to act from the user callback instead from same
570 process context as the service loop
571
572 - libwebsockets_broadcast() - use libwebsocket_callback_on_writable[_all_protocol]()
573 instead from same process context as the service loop. See the test apps
574 for examples.
575
576 - x-google-mux() removed until someone wants it
577
578 - pre -v13 (ancient) protocol support removed
579
580
581New features
582------------
583
584 - echo test server and client compatible with echo.websocket.org added
585
586 - many new configure options (see README.build) to reduce footprint of the
587 library to what you actually need, eg, --without-client and
588 --without-server
589
590 - http + websocket server can build to as little as 12K .text for ARM
591
592 - no more MAX_CLIENTS limitation; adapts to support the max number of fds
593 allowed to the process by ulimit, defaults to 1024 on Fedora and
594 Ubuntu. Use ulimit to control this without needing to configure
595 the library. Code here is smaller and faster.
596
597 - adaptive ratio of listen socket to connection socket service allows
598 good behaviour under Apache ab test load. Tested with thousands
599 of simultaneous connections
600
601 - reduction in per-connection memory footprint by moving to a union to hold
602 mutually-exclusive state for the connection
603
604 - robustness: Out of Memory taken care of for all allocation code now
605
606 - internal getifaddrs option if your toolchain lacks it (some uclibc)
607
608 - configurable memory limit for deflate operations
609
610 - improvements in SSL code nonblocking operation, possible hang solved,
611 some SSL operations broken down into pollable states so there is
612 no library blocking, timeout coverage for SSL_connect
613
614 - extpoll test server merged into single test server source
615
616 - robustness: library should deal with all recoverable socket conditions
617
618 - rx flowcontrol for backpressure notification fixed and implmeneted
619 correctly in the test server
620
621 - optimal lexical parser added for header processing; all headers in a
622 single 276-byte state table
623
624 - latency tracking api added (configure --with-latency)
625
626 - Improved in-tree documentation, REAME.build, README.coding,
627 README.test-apps, changelog
628
629 - Many small fixes
630
631
632v1.0-chrome25-firefox17 (6cd1ea9b005933f)