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