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