blob: 0a9318b91dd904f3b56ab4b80bd34da297cd74b5 [file] [log] [blame]
Andy Greena35c86f2013-01-31 10:16:44 +08001Changelog
2---------
3
MGadkari020c53c2015-08-21 16:15:36 +05304(since last tag)
5
6User api changes
7----------------
8
9LWS_CALLBACK_CLIENT_CONNECTION_ERROR may provide an error string if in is
10non-NULL. If so, the string has length len.
11
Andy Green6d59f592015-10-15 09:12:58 +080012LWS_SERVER_OPTION_PEER_CERT_NOT_REQUIRED is available to relax the requirement
13for peer certs if you are using the option to require client certs.
14
Andy Green16fb0132015-03-28 11:35:40 +080015v1.4-chrome43-firefox36
16=======================
Olehfaeac3c2014-07-29 23:18:41 +080017
18User api additions
19------------------
20
21There's a new member in the info struct used to control context creation,
22ssl_private_key_password, which allows passing into lws the passphrase on
23an SSL cetificate
24
Andy Greeneabed8d2014-08-11 12:11:36 +080025There's a new member in struct protocols, id, which is ignored by lws but can
26be used by the user code to mark the selected protocol by user-defined version
27or capabliity flag information, for the case multiple versions of a protocol are
28supported.
29
Andy Greenb128ccc2014-08-16 09:54:27 +080030int lws_is_ssl(wsi) added to allow user code to know if the connection was made
31over ssl or not. If LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT is used, both
32ssl and non-ssl connections are possible and may need to be treated differently
33in the user code.
34
Andy Green14425ea2014-08-18 22:49:39 +080035int lws_partial_buffered(wsi) added... should be checked after any
36libwebsocket_write that will be followed by another libwebsocket_write inside
37the same writeable callback. If set, you can't do any more writes until the
38writeable callback is called again. If you only do one write per writeable callback,
39you can ignore this.
40
Andy Green917f43a2014-10-12 14:31:47 +080041HTTP2-related: HTTP2 changes how headers are handled, lws now has new version-
42agnositic header creation APIs. These do the right thing depending on each
43connection's HTTP version without the user code having to know or care, except
44to make sure to use the new APIs for headers (test-server is updated to use
45them already, so look there for examples)
46
47The APIs "render" the headers into a user-provided buffer and bump *p as it
48is used. If *p reaches end, then the APIs return nonzero for error.
49
50LWS_VISIBLE LWS_EXTERN int
51lws_add_http_header_status(struct libwebsocket_context *context,
52 struct libwebsocket *wsi,
53 unsigned int code,
54 unsigned char **p,
55 unsigned char *end);
56
57Start a response header reporting status like 200, 500, etc
58
59LWS_VISIBLE LWS_EXTERN int
60lws_add_http_header_by_name(struct libwebsocket_context *context,
61 struct libwebsocket *wsi,
62 const unsigned char *name,
63 const unsigned char *value,
64 int length,
65 unsigned char **p,
66 unsigned char *end);
67
68Add a header like name: value in HTTP1.x
69
70LWS_VISIBLE LWS_EXTERN int
71lws_finalize_http_header(struct libwebsocket_context *context,
72 struct libwebsocket *wsi,
73 unsigned char **p,
74 unsigned char *end);
75
76Finish off the headers, like add the extra \r\n in HTTP1.x
77
78LWS_VISIBLE LWS_EXTERN int
79lws_add_http_header_by_token(struct libwebsocket_context *context,
80 struct libwebsocket *wsi,
81 enum lws_token_indexes token,
82 const unsigned char *value,
83 int length,
84 unsigned char **p,
85 unsigned char *end);
86
87Add a header by using a lws token as the name part. In HTTP2, this can be
88compressed to one or two bytes.
89
Olehfaeac3c2014-07-29 23:18:41 +080090
Andy Green822241c2014-08-18 22:21:51 +080091User api removal
92----------------
93
94protocols struct member no_buffer_all_partial_tx is removed. Under some
95conditions like rewriting extention such as compression in use, the built-in
96partial send buffering is the only way to deal with the problem, so turning
97it off is deprecated.
98
99
Andy Green917f43a2014-10-12 14:31:47 +0800100User api changes
101----------------
102
103HTTP2-related: API libwebsockets_serve_http_file() takes an extra parameter at
104the end now
105
106int other_headers_len)
107
108If you are providing other headers, they must be generated using the new
109HTTP-version-agnostic APIs, and you must provide the length of them using this
110additional parameter.
111
joseph.urciuoli4d9c8fc2014-10-16 08:53:19 +0800112struct lws_context_creation_info now has an additional member
113SSL_CTX *provided_client_ssl_ctx you may set to an externally-initialized
114SSL_CTX managed outside lws. Defaulting to zero keeps the existing behaviour of
115lws managing the context, if you memset the struct to 0 or have as a filescope
116initialized struct in bss, no need to change anything.
117
Andy Green822241c2014-08-18 22:21:51 +0800118
Andy Greenc1fdd102014-07-06 09:56:11 +0800119v1.3-chrome37-firefox30
120=======================
121
122 .gitignore | 1 -
123 CMakeLists.txt | 447 +++--
124 README.build | 35 +-
125 README.coding | 14 +
126 changelog | 66 +
127 cmake/LibwebsocketsConfig.cmake.in | 17 +
128 cmake/LibwebsocketsConfigVersion.cmake.in | 11 +
129 config.h.cmake | 18 +
130 cross-ming.cmake | 31 +
131 cross-openwrt-makefile | 91 +
132 lib/client-handshake.c | 205 ++-
133 lib/client-parser.c | 58 +-
134 lib/client.c | 158 +-
135 lib/context.c | 341 ++++
136 lib/extension-deflate-frame.c | 2 +-
137 lib/extension.c | 178 ++
138 lib/handshake.c | 287 +---
139 lib/lextable.h | 338 ++++
140 lib/libev.c | 175 ++
141 lib/libwebsockets.c | 2089 +++--------------------
142 lib/libwebsockets.h | 253 ++-
143 lib/lws-plat-unix.c | 404 +++++
144 lib/lws-plat-win.c | 358 ++++
145 lib/minilex.c | 530 +++---
146 lib/output.c | 445 ++---
147 lib/parsers.c | 682 ++++----
148 lib/pollfd.c | 239 +++
149 lib/private-libwebsockets.h | 501 +++++-
150 lib/server-handshake.c | 274 +--
151 lib/server.c | 858 ++++++++--
152 lib/service.c | 517 ++++++
153 lib/sha-1.c | 38 +-
154 lib/ssl-http2.c | 78 +
155 lib/ssl.c | 571 +++++++
156 test-server/attack.sh | 101 +-
157 test-server/test-client.c | 9 +-
158 test-server/test-echo.c | 17 +-
159 test-server/test-fraggle.c | 7 -
160 test-server/test-ping.c | 12 +-
161 test-server/test-server.c | 330 ++--
162 test-server/test.html | 4 +-
163 win32port/client/client.vcxproj | 259 ---
164 win32port/client/client.vcxproj.filters | 39 -
165 .../libwebsocketswin32.vcxproj.filters | 93 -
166 win32port/server/server.vcxproj | 276 ---
167 win32port/server/server.vcxproj.filters | 51 -
168 win32port/win32helpers/gettimeofday.h | 59 +-
169 win32port/win32helpers/netdb.h | 1 -
170 win32port/win32helpers/strings.h | 0
171 win32port/win32helpers/sys/time.h | 1 -
172 win32port/win32helpers/unistd.h | 0
173 win32port/win32helpers/websock-w32.c | 104 --
174 win32port/win32helpers/websock-w32.h | 62 -
175 win32port/win32port.sln | 100 --
176 win32port/zlib/gzio.c | 3 +-
177 55 files changed, 6779 insertions(+), 5059 deletions(-)
178
Andy Green79002562013-11-09 11:04:35 +0800179
kapejodce64fb02013-11-19 13:38:16 +0100180User api additions
181------------------
182
183POST method is supported
184
185The protocol 0 / HTTP callback can now get two new kinds of callback,
186LWS_CALLBACK_HTTP_BODY (in and len are a chunk of the body of the HTTP request)
187and LWS_CALLBACK_HTTP_BODY_COMPLETION (the expected amount of body has arrived
188and been passed to the user code already). These callbacks are used with the
189post method (see the test server for details).
190
191The period between the HTTP header completion and the completion of the body
192processing is protected by a 5s timeout.
193
194The chunks are stored in a malloc'd buffer of size protocols[0].rx_buffer_size.
195
196
James Devine5b34c972013-12-14 11:41:29 +0800197New server option you can enable from user code
198LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT allows non-SSL connections to
199also be accepted on an SSL listening port. It's disabled unless you enable
200it explicitly.
201
202
Andy Green7a132792013-12-18 09:48:26 +0800203Two new callbacks are added in protocols[0] that are optional for allowing
204limited thread access to libwebsockets, LWS_CALLBACK_LOCK_POLL and
205LWS_CALLBACK_UNLOCK_POLL.
206
207If you use them, they protect internal and external poll list changes, but if
208you want to use external thread access to libwebsocket_callback_on_writable()
209you have to implement your locking here even if you don't use external
210poll support.
211
212If you will use another thread for this, take a lot of care about managing
213your list of live wsi by doing it from ESTABLISHED and CLOSED callbacks
214(with your own locking).
215
Andrew Canaday9769f4f2014-03-23 13:25:07 +0800216If you configure cmake with -DLWS_WITH_LIBEV=1 then the code allowing the libev
217eventloop instead of the default poll() one will also be compiled in. But to
218use it, you must also set the LWS_SERVER_OPTION_LIBEV flag on the context
219creation info struct options member.
Andy Green7a132792013-12-18 09:48:26 +0800220
Andy Greenc1fdd102014-07-06 09:56:11 +0800221IPV6 is supported and enabled by default except for Windows, you can disable
222the support at build-time by giving -DLWS_IPV6=, and disable use of it even if
James Devine3f13ea22014-03-24 16:09:25 +0800223compiled in by making sure the flag LWS_SERVER_OPTION_DISABLE_IPV6 is set on
224the context creation info struct options member.
225
Andy Greenc1fdd102014-07-06 09:56:11 +0800226You can give LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS option flag to
227guarantee the OS CAs will not be used, even if that support was selected at
228build-time.
229
230Optional "token limits" may be enforced by setting the member "token_limits"
231in struct lws_context_creation_info to point to a struct lws_token_limits.
232NULL means no token limits used for compatibility.
233
Andy Green7a132792013-12-18 09:48:26 +0800234
Andy Green79002562013-11-09 11:04:35 +0800235User api changes
236----------------
237
238Extra optional argument to libwebsockets_serve_http_file() allows injecion
239of HTTP headers into the canned response. Eg, cookies may be added like
240that without getting involved in having to send the header by hand.
241
Patrick Gansterer148b9452014-02-28 02:31:23 +0100242A new info member http_proxy_address may be used at context creation time to
243set the http proxy. If non-NULL, it overrides http_proxy environment var.
Andy Green79002562013-11-09 11:04:35 +0800244
Andy Greend2ec7ad2014-03-15 10:39:29 +0800245Cmake supports LWS_SSL_CLIENT_USE_OS_CA_CERTS defaulting to on, which gets
246the client to use the OS CA Roots. If you're worried somebody with the
247ability to forge for force creation of a client cert from the root CA in
248your OS, you should disable this since your selfsigned $0 cert is a lot safer
249then...
250
Andy Green79002562013-11-09 11:04:35 +0800251
Andy Green81877e62013-10-26 20:36:08 +0800252v1.23-chrome32-firefox24
253========================
254
255 Android.mk | 29 +
256 CMakeLists.txt | 573 ++++++++----
257 COPYING | 503 -----------
258 INSTALL | 365 --------
259 Makefile.am | 13 -
260 README.build | 371 ++------
261 README.coding | 63 ++
262 autogen.sh | 1578 ---------------------------------
263 changelog | 69 ++
264 cmake/FindGit.cmake | 163 ++++
265 cmake/FindOpenSSLbins.cmake | 15 +-
266 cmake/UseRPMTools.cmake | 176 ++++
267 config.h.cmake | 25 +-
268 configure.ac | 226 -----
269 cross-arm-linux-gnueabihf.cmake | 28 +
270 lib/Makefile.am | 89 --
271 lib/base64-decode.c | 98 +-
272 lib/client-handshake.c | 123 ++-
273 lib/client-parser.c | 19 +-
274 lib/client.c | 145 ++-
275 lib/daemonize.c | 4 +-
276 lib/extension.c | 2 +-
277 lib/getifaddrs.h | 4 +-
278 lib/handshake.c | 76 +-
279 lib/libwebsockets.c | 491 ++++++----
280 lib/libwebsockets.h | 164 ++--
281 lib/output.c | 214 ++++-
282 lib/parsers.c | 102 +--
283 lib/private-libwebsockets.h | 66 +-
284 lib/server-handshake.c | 5 +-
285 lib/server.c | 29 +-
286 lib/sha-1.c | 2 +-
287 libwebsockets-api-doc.html | 249 +++---
288 libwebsockets.pc.in | 11 -
289 libwebsockets.spec | 14 +-
290 m4/ignore-me | 2 -
291 scripts/FindLibWebSockets.cmake | 33 +
292 scripts/kernel-doc | 1 +
293 test-server/Makefile.am | 131 ---
294 test-server/leaf.jpg | Bin 0 -> 2477518 bytes
295 test-server/test-client.c | 78 +-
296 test-server/test-echo.c | 33 +-
297 test-server/test-fraggle.c | 26 +-
298 test-server/test-ping.c | 15 +-
299 test-server/test-server.c | 197 +++-
300 test-server/test.html | 5 +-
301 win32port/win32helpers/gettimeofday.c | 74 +-
302 win32port/win32helpers/websock-w32.h | 6 +-
303 48 files changed, 2493 insertions(+), 4212 deletions(-)
304
Andy Green54cb3462013-02-14 22:23:54 +0800305
306User api additions
307------------------
308
309 - You can now call libwebsocket_callback_on_writable() on http connectons,
310 and get a LWS_CALLBACK_HTTP_WRITEABLE callback, the same way you can
311 regulate writes with a websocket protocol connection.
312
Andy Green2672fb22013-02-22 09:54:35 +0800313 - A new member in the context creation parameter struct "ssl_cipher_list" is
314 added, replacing CIPHERS_LIST_STRING. NULL means use the ssl library
315 default list of ciphers.
316
Andy Green58f214e2013-03-09 13:03:53 +0800317 - Not really an api addition, but libwebsocket_service_fd() will now zero
318 the revents field of the pollfd it was called with if it handled the
319 descriptor. So you can tell if it is a non-lws fd by checking revents
320 after the service call... if it's still nonzero, the descriptor
321 belongs to you and you need to take care of it.
322
Andy Greenb55451c2013-03-16 12:32:27 +0800323 - libwebsocket_rx_flow_allow_all_protocol(protocol) will unthrottle all
324 connections with the established protocol. It's designed to be
325 called from user server code when it sees it can accept more input
326 and may have throttled connections using the server rx flow apis
327 while it was unable to accept any other input The user server code
328 then does not have to try to track while connections it choked, this
329 will free up all of them in one call.
330
Andy Green0c9563b2013-06-10 22:54:40 +0800331 - there's a new, optional callback LWS_CALLBACK_CLOSED_HTTP which gets
332 called when an HTTP protocol socket closes
333
Andy Green96d48fd2013-09-18 08:32:55 +0800334 - for LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION callback, the user_space alloc
335 has already been done before the callback happens. That means we can
336 use the user parameter to the callback to contain the user pointer, and
337 move the protocol name to the "in" parameter. The docs for this
338 callback are also updated to reflect how to check headers in there.
339
Andy Green5dc62ea2013-09-20 20:26:12 +0800340 - libwebsocket_client_connect() is now properly nonblocking and async. See
341 README.coding and test-client.c for information on the callbacks you
342 can rely on controlling the async connection period with.
343
Andy Green81877e62013-10-26 20:36:08 +0800344 - if your OS does not support the http_proxy environment variable convention
345 (eg, reportedly OSX), you can use a new api libwebsocket_set_proxy()
346 to set the proxy details inbetween context creation and the connection
347 action. For OSes that support http_proxy, that's used automatically.
Andy Greenb55451c2013-03-16 12:32:27 +0800348
Andy Green50097dd2013-02-15 22:36:30 +0800349User api changes
350----------------
351
352 - the external poll callbacks now get the socket descriptor coming from the
353 "in" parameter. The user parameter provides the user_space for the
354 wsi as it normally does on the other callbacks.
Edwin van den Oetelaar8c8a8e12013-02-20 20:56:59 +0800355 LWS_CALLBACK_FILTER_NETWORK_CONNECTION also has the socket descriptor
356 delivered by @in now instead of @user.
Andy Green50097dd2013-02-15 22:36:30 +0800357
Andy Greenfc7c5e42013-02-23 10:50:10 +0800358 - libwebsocket_write() now returns -1 for error, or the amount of data
359 actually accepted for send. Under load, the OS may signal it is
360 ready to send new data on the socket, but have only a restricted
361 amount of memory to buffer the packet compared to usual.
362
Andy Green50097dd2013-02-15 22:36:30 +0800363
Andy Greendc914cf2013-02-18 16:54:26 +0800364User api removal
365----------------
366
367 - libwebsocket_ensure_user_space() is removed from the public api, if you
368 were using it to get user_space, you need to adapt your code to only
369 use user_space inside the user callback.
370
Andy Green2672fb22013-02-22 09:54:35 +0800371 - CIPHERS_LIST_STRING is removed
372
Andy Green0097a992013-03-09 13:06:37 +0800373 - autotools build has been removed. See README.build for info on how to
374 use CMake for your platform
375
Andy Green54cb3462013-02-14 22:23:54 +0800376
Andy Green53a46782013-02-14 11:23:49 +0800377v1.21-chrome26-firefox18
378========================
379
380 - Fixes buffer overflow bug in max frame size handling if you used the
381 default protocol buffer size. If you declared rx_buffer_size in your
382 protocol, which is recommended anyway, your code was unaffected.
383
Andy Green182cb9a2013-02-13 11:54:08 +0800384v1.2-chrome26-firefox18
385=======================
386
387Diffstat
388--------
389
390 .gitignore | 16 +++
391 CMakeLists.txt | 544 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
392 LICENSE | 526 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
393 Makefile.am | 1 +
394 README | 20 +++
395 README.build | 258 ++++++++++++++++++++++++++++++++-----
396 README.coding | 52 ++++++++
397 changelog | 136 ++++++++++++++++++++
398 cmake/FindOpenSSLbins.cmake | 33 +++++
399 config.h.cmake | 173 +++++++++++++++++++++++++
400 configure.ac | 22 +++-
401 lib/Makefile.am | 20 ++-
402 lib/base64-decode.c | 2 +-
403 lib/client-handshake.c | 190 +++++++++++-----------------
404 lib/client-parser.c | 88 +++++++------
405 lib/client.c | 384 ++++++++++++++++++++++++++++++-------------------------
406 lib/daemonize.c | 32 +++--
407 lib/extension-deflate-frame.c | 58 +++++----
408 lib/extension-deflate-stream.c | 19 ++-
409 lib/extension-deflate-stream.h | 4 +-
410 lib/extension.c | 11 +-
411 lib/getifaddrs.c | 315 +++++++++++++++++++++++-----------------------
412 lib/getifaddrs.h | 30 ++---
413 lib/handshake.c | 124 +++++++++++-------
414 lib/libwebsockets.c | 736 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------
415 lib/libwebsockets.h | 237 ++++++++++++++++++++++------------
416 lib/output.c | 192 +++++++++++-----------------
417 lib/parsers.c | 966 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------
418 lib/private-libwebsockets.h | 225 +++++++++++++++++++++------------
419 lib/server-handshake.c | 82 ++++++------
420 lib/server.c | 96 +++++++-------
421 libwebsockets-api-doc.html | 189 ++++++++++++++++++----------
422 libwebsockets.spec | 17 +--
423 test-server/attack.sh | 148 ++++++++++++++++++++++
424 test-server/test-client.c | 125 +++++++++---------
425 test-server/test-echo.c | 31 +++--
426 test-server/test-fraggle.c | 32 ++---
427 test-server/test-ping.c | 52 ++++----
428 test-server/test-server.c | 129 ++++++++++++-------
429 win32port/libwebsocketswin32/libwebsocketswin32.vcxproj | 279 ----------------------------------------
430 win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters | 23 +++-
431 41 files changed, 4398 insertions(+), 2219 deletions(-)
432
Andy Green7b405452013-02-01 10:50:15 +0800433
434User api additions
435------------------
436
437 - lws_get_library_version() returns a const char * with a string like
438 "1.1 9e7f737", representing the library version from configure.ac
439 and the git HEAD hash the library was built from
440
Andy Greena47865f2013-02-10 09:39:47 +0800441 - TCP Keepalive can now optionally be applied to all lws sockets, on Linux
442 also with controllable timeout, number of probes and probe interval.
443 (On BSD type OS, you can only use system default settings for the
444 timing and retries, although enabling it is supported by setting
445 ka_time to nonzero, the exact value has no meaning.)
446 This enables detection of idle connections which are logically okay,
447 but are in fact dead, due to network connectivity issues at the server,
Andy Greena690cd02013-02-09 12:25:31 +0800448 client, or any intermediary. By default it's not enabled, but you
449 can enable it by setting a non-zero timeout (in seconds) at the new
450 ka_time member at context creation time.
451
Andy Greena7109e62013-02-11 12:05:54 +0800452 - Two new optional user callbacks added, LWS_CALLBACK_PROTOCOL_DESTROY which
453 is called one-time per protocol as the context is being destroyed, and
454 LWS_CALLBACK_PROTOCOL_INIT which is called when the context is created
455 and the protocols are added, again it's a one-time affair.
456 This lets you manage per-protocol allocations properly including
457 cleaning up after yourself when the server goes down.
Andy Green7b405452013-02-01 10:50:15 +0800458
Andy Greened334462013-02-07 21:14:33 +0800459User api changes
460----------------
461
Andy Green1b265272013-02-09 14:01:09 +0800462 - libwebsocket_create_context() has changed from taking a ton of parameters
463 to just taking a pointer to a struct containing the parameters. The
464 struct lws_context_creation_info is in libwebsockets.h, the members
465 are in the same order as when they were parameters to the call
466 previously. The test apps are all updated accordingly so you can
467 see example code there.
468
Andy Greened334462013-02-07 21:14:33 +0800469 - Header tokens are now deleted after the websocket connection is
Andy Green54495112013-02-06 21:10:16 +0900470 established. Not just the header data is saved, but the pointer and
471 length array is also removed from (union) scope saving several hundred
472 bytes per connection once it is established
473
474 - struct libwebsocket_protocols has a new member rx_buffer_size, this
475 controls rx buffer size per connection of that protocol now. Sources
476 for apps built against older versions of the library won't declare
477 this in their protocols, defaulting it to 0. Zero buffer is legal,
478 it causes a default buffer to be allocated (currently 4096)
479
480 If you want to receive only atomic frames in your user callback, you
481 should set this to greater than your largest frame size. If a frame
482 comes that exceeds that, no error occurs but the callback happens as
483 soon as the buffer limit is reached, and again if it is reached again
484 or the frame completes. You can detect that has happened by seeing
485 there is still frame content pending using
486 libwebsockets_remaining_packet_payload()
487
488 By correctly setting this, you can save a lot of memory when your
489 protocol has small frames (see the test server and client sources).
490
Andy Green16ab3182013-02-10 18:02:31 +0800491 - LWS_MAX_HEADER_LEN now defaults to 1024 and is the total amount of known
492 header payload lws can cope with, that includes the GET URL, origin
493 etc. Headers not understood by lws are ignored and their payload
494 not included in this.
495
Andy Green54495112013-02-06 21:10:16 +0900496
497User api removals
498-----------------
499
Andy Green16ab3182013-02-10 18:02:31 +0800500 - The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
501 buffer size chosen per-protocol. For compatibility, there's a default
502 of 4096 rx buffer, but user code should set the appropriate size for
503 the protocol frames.
504
505 - LWS_INITIAL_HDR_ALLOC and LWS_ADDITIONAL_HDR_ALLOC are no longer needed
506 and have been removed. There's a new header management scheme that
507 handles them in a much more compact way.
Andy Greened334462013-02-07 21:14:33 +0800508
Andy Green70edd6f2013-02-12 10:15:25 +0800509 - libwebsockets_hangup_on_client() is removed. If you want to close the
510 connection you must do so from the user callback and by returning
511 -1 from there.
512
Andy Green508946c2013-02-12 10:19:08 +0800513 - libwebsocket_close_and_free_session() is now private to the library code
514 only and not exposed for user code. If you want to close the
515 connection, you must do so from the user callback by returning -1
516 from there.
517
Andy Greened334462013-02-07 21:14:33 +0800518
Andy Greendf60b0c2013-02-06 19:57:12 +0900519New features
520------------
521
Andy Green9b09dc02013-02-08 12:48:36 +0800522 - Cmake project file added, aimed initially at Windows support: this replaces
Andy Green16ab3182013-02-10 18:02:31 +0800523 the visual studio project files that were in the tree until now.
Andy Greendf60b0c2013-02-06 19:57:12 +0900524
Andy Greenc3ef0d62013-02-12 10:50:49 +0800525 - CyaSSL now supported in place of OpenSSL (--use-cyassl on configure)
526
Andy Green9b09dc02013-02-08 12:48:36 +0800527 - PATH_MAX or MAX_PATH no longer needed
Andy Greendf60b0c2013-02-06 19:57:12 +0900528
Andy Green54495112013-02-06 21:10:16 +0900529 - cutomizable frame rx buffer size by protocol
530
Andy Greenc3ef0d62013-02-12 10:50:49 +0800531 - optional TCP keepalive so dead peers can be detected, can be enabled at
532 context-creation time
533
534 - valgrind-clean: no SSL or CyaSSL: completely clean. With OpenSSL, 88 bytes
535 lost at OpenSSL library init and symptomless reports of uninitialized
536 memory usage... seems to be a known and ignored problem at OpenSSL
537
Andy Greena3957ef2013-02-11 09:31:43 +0800538 - By default debug is enabled and the library is built for -O0 -g to faclitate
539 that. Use --disable-debug configure option to build instead with -O4
540 and no -g (debug info), obviously providing best performance and
541 reduced binary size.
Andy Green7b405452013-02-01 10:50:15 +0800542
Andy Green895d56d2013-02-11 09:32:53 +0800543 - 1.0 introduced some code to try to not deflate small frames, however this
544 seems to break when confronted with a mixture of frames above and
545 below the threshold, so it's removed. Veto the compression extension
546 in your user callback if you will typically have very small frames.
547
Andy Green16ab3182013-02-10 18:02:31 +0800548 - There are many memory usage improvements, both a reduction in malloc/
549 realloc and architectural changes. A websocket connection now
550 consumes only 296 bytes with SSL or 272 bytes without on x86_64,
551 during header processing an additional 1262 bytes is allocated in a
552 single malloc, but is freed when the websocket connection starts.
553 The RX frame buffer defined by the protocol in user
554 code is also allocated per connection, this represents the largest
555 frame you can receive atomically in that protocol.
556
Andy Greenc3ef0d62013-02-12 10:50:49 +0800557 - On ARM9 build, just http+ws server no extensions or ssl, <12Kbytes .text
558 and 112 bytes per connection (+1328 only during header processing)
559
Andy Green895d56d2013-02-11 09:32:53 +0800560
Andy Greenbd1132f2013-01-31 19:53:05 +0800561v1.1-chrome26-firefox18
Andy Greena35c86f2013-01-31 10:16:44 +0800562=======================
563
564Diffstat
565--------
566
567 Makefile.am | 4 +
568 README-test-server | 291 ---
569 README.build | 239 ++
570 README.coding | 138 ++
571 README.rst | 72 -
572 README.test-apps | 272 +++
573 configure.ac | 116 +-
574 lib/Makefile.am | 55 +-
575 lib/base64-decode.c | 5 +-
576 lib/client-handshake.c | 121 +-
577 lib/client-parser.c | 394 ++++
578 lib/client.c | 807 +++++++
579 lib/daemonize.c | 212 ++
580 lib/extension-deflate-frame.c | 132 +-
581 lib/extension-deflate-stream.c | 12 +-
582 lib/extension-x-google-mux.c | 1223 ----------
583 lib/extension-x-google-mux.h | 96 -
584 lib/extension.c | 8 -
585 lib/getifaddrs.c | 271 +++
586 lib/getifaddrs.h | 76 +
587 lib/handshake.c | 582 +----
588 lib/libwebsockets.c | 2493 ++++++---------------
589 lib/libwebsockets.h | 115 +-
590 lib/md5.c | 217 --
591 lib/minilex.c | 440 ++++
592 lib/output.c | 628 ++++++
593 lib/parsers.c | 2016 +++++------------
594 lib/private-libwebsockets.h | 284 +--
595 lib/server-handshake.c | 275 +++
596 lib/server.c | 377 ++++
597 libwebsockets-api-doc.html | 300 +--
598 m4/ignore-me | 2 +
599 test-server/Makefile.am | 111 +-
600 test-server/libwebsockets.org-logo.png | Bin 0 -> 7029 bytes
601 test-server/test-client.c | 45 +-
602 test-server/test-echo.c | 330 +++
603 test-server/test-fraggle.c | 20 +-
604 test-server/test-ping.c | 22 +-
605 test-server/test-server-extpoll.c | 554 -----
606 test-server/test-server.c | 349 ++-
607 test-server/test.html | 3 +-
608 win32port/zlib/ZLib.vcxproj | 749 ++++---
609 win32port/zlib/ZLib.vcxproj.filters | 188 +-
610 win32port/zlib/adler32.c | 348 ++-
611 win32port/zlib/compress.c | 160 +-
612 win32port/zlib/crc32.c | 867 ++++----
613 win32port/zlib/crc32.h | 882 ++++----
614 win32port/zlib/deflate.c | 3799 +++++++++++++++-----------------
615 win32port/zlib/deflate.h | 688 +++---
616 win32port/zlib/gzclose.c | 50 +-
617 win32port/zlib/gzguts.h | 325 ++-
618 win32port/zlib/gzlib.c | 1157 +++++-----
619 win32port/zlib/gzread.c | 1242 ++++++-----
620 win32port/zlib/gzwrite.c | 1096 +++++----
621 win32port/zlib/infback.c | 1272 ++++++-----
622 win32port/zlib/inffast.c | 680 +++---
623 win32port/zlib/inffast.h | 22 +-
624 win32port/zlib/inffixed.h | 188 +-
625 win32port/zlib/inflate.c | 2976 +++++++++++++------------
626 win32port/zlib/inflate.h | 244 +-
627 win32port/zlib/inftrees.c | 636 +++---
628 win32port/zlib/inftrees.h | 124 +-
629 win32port/zlib/trees.c | 2468 +++++++++++----------
630 win32port/zlib/trees.h | 256 +--
631 win32port/zlib/uncompr.c | 118 +-
632 win32port/zlib/zconf.h | 934 ++++----
633 win32port/zlib/zlib.h | 3357 ++++++++++++++--------------
634 win32port/zlib/zutil.c | 642 +++---
635 win32port/zlib/zutil.h | 526 ++---
636 69 files changed, 19556 insertions(+), 20145 deletions(-)
637
638user api changes
639----------------
640
641 - libwebsockets_serve_http_file() now takes a context as first argument
642
643 - libwebsockets_get_peer_addresses() now takes a context and wsi as first
644 two arguments
645
646
647user api additions
648------------------
649
650 - lwsl_...() logging apis, default to stderr but retargetable by user code;
651 may be used also by user code
652
653 - lws_set_log_level() set which logging apis are able to emit (defaults to
654 notice, warn, err severities), optionally set the emit callback
655
656 - lwsl_emit_syslog() helper callback emits to syslog
657
658 - lws_daemonize() helper code that forks the app into a headless daemon
659 properly, maintains a lock file with pid in suitable for sysvinit etc to
660 control lifecycle
661
662 - LWS_CALLBACK_HTTP_FILE_COMPLETION callback added since http file
663 transfer is now asynchronous (see test server code)
664
665 - lws_frame_is_binary() from a wsi pointer, let you know if the received
666 data was sent in BINARY mode
667
668
669user api removals
670-----------------
671
672 - libwebsockets_fork_service_loop() - no longer supported (had intractable problems)
673 arrange your code to act from the user callback instead from same
674 process context as the service loop
675
676 - libwebsockets_broadcast() - use libwebsocket_callback_on_writable[_all_protocol]()
677 instead from same process context as the service loop. See the test apps
678 for examples.
679
680 - x-google-mux() removed until someone wants it
681
682 - pre -v13 (ancient) protocol support removed
683
684
685New features
686------------
687
688 - echo test server and client compatible with echo.websocket.org added
689
690 - many new configure options (see README.build) to reduce footprint of the
691 library to what you actually need, eg, --without-client and
692 --without-server
693
694 - http + websocket server can build to as little as 12K .text for ARM
695
696 - no more MAX_CLIENTS limitation; adapts to support the max number of fds
697 allowed to the process by ulimit, defaults to 1024 on Fedora and
698 Ubuntu. Use ulimit to control this without needing to configure
699 the library. Code here is smaller and faster.
700
701 - adaptive ratio of listen socket to connection socket service allows
702 good behaviour under Apache ab test load. Tested with thousands
703 of simultaneous connections
704
705 - reduction in per-connection memory footprint by moving to a union to hold
706 mutually-exclusive state for the connection
707
708 - robustness: Out of Memory taken care of for all allocation code now
709
710 - internal getifaddrs option if your toolchain lacks it (some uclibc)
711
712 - configurable memory limit for deflate operations
713
714 - improvements in SSL code nonblocking operation, possible hang solved,
715 some SSL operations broken down into pollable states so there is
716 no library blocking, timeout coverage for SSL_connect
717
718 - extpoll test server merged into single test server source
719
720 - robustness: library should deal with all recoverable socket conditions
721
722 - rx flowcontrol for backpressure notification fixed and implmeneted
723 correctly in the test server
724
725 - optimal lexical parser added for header processing; all headers in a
726 single 276-byte state table
727
728 - latency tracking api added (configure --with-latency)
729
730 - Improved in-tree documentation, REAME.build, README.coding,
731 README.test-apps, changelog
732
733 - Many small fixes
734
735
736v1.0-chrome25-firefox17 (6cd1ea9b005933f)