blob: 442ab6a2b3e9a71e92f7c37c7ff3d892cd51ac85 [file] [log] [blame]
Andy Greena35c86f2013-01-31 10:16:44 +08001Changelog
2---------
3
Andy Green7b405452013-02-01 10:50:15 +08004(development since 1.1....)
5
6User api additions
7------------------
8
9 - lws_get_library_version() returns a const char * with a string like
10 "1.1 9e7f737", representing the library version from configure.ac
11 and the git HEAD hash the library was built from
12
Andy Greena47865f2013-02-10 09:39:47 +080013 - TCP Keepalive can now optionally be applied to all lws sockets, on Linux
14 also with controllable timeout, number of probes and probe interval.
15 (On BSD type OS, you can only use system default settings for the
16 timing and retries, although enabling it is supported by setting
17 ka_time to nonzero, the exact value has no meaning.)
18 This enables detection of idle connections which are logically okay,
19 but are in fact dead, due to network connectivity issues at the server,
Andy Greena690cd02013-02-09 12:25:31 +080020 client, or any intermediary. By default it's not enabled, but you
21 can enable it by setting a non-zero timeout (in seconds) at the new
22 ka_time member at context creation time.
23
Andy Green7b405452013-02-01 10:50:15 +080024
Andy Greened334462013-02-07 21:14:33 +080025User api changes
26----------------
27
Andy Green1b265272013-02-09 14:01:09 +080028 - libwebsocket_create_context() has changed from taking a ton of parameters
29 to just taking a pointer to a struct containing the parameters. The
30 struct lws_context_creation_info is in libwebsockets.h, the members
31 are in the same order as when they were parameters to the call
32 previously. The test apps are all updated accordingly so you can
33 see example code there.
34
Andy Greened334462013-02-07 21:14:33 +080035 - Header tokens are now deleted after the websocket connection is
Andy Green54495112013-02-06 21:10:16 +090036 established. Not just the header data is saved, but the pointer and
37 length array is also removed from (union) scope saving several hundred
38 bytes per connection once it is established
39
40 - struct libwebsocket_protocols has a new member rx_buffer_size, this
41 controls rx buffer size per connection of that protocol now. Sources
42 for apps built against older versions of the library won't declare
43 this in their protocols, defaulting it to 0. Zero buffer is legal,
44 it causes a default buffer to be allocated (currently 4096)
45
46 If you want to receive only atomic frames in your user callback, you
47 should set this to greater than your largest frame size. If a frame
48 comes that exceeds that, no error occurs but the callback happens as
49 soon as the buffer limit is reached, and again if it is reached again
50 or the frame completes. You can detect that has happened by seeing
51 there is still frame content pending using
52 libwebsockets_remaining_packet_payload()
53
54 By correctly setting this, you can save a lot of memory when your
55 protocol has small frames (see the test server and client sources).
56
Andy Green16ab3182013-02-10 18:02:31 +080057 - LWS_MAX_HEADER_LEN now defaults to 1024 and is the total amount of known
58 header payload lws can cope with, that includes the GET URL, origin
59 etc. Headers not understood by lws are ignored and their payload
60 not included in this.
61
Andy Green54495112013-02-06 21:10:16 +090062
63User api removals
64-----------------
65
Andy Green16ab3182013-02-10 18:02:31 +080066 - The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
67 buffer size chosen per-protocol. For compatibility, there's a default
68 of 4096 rx buffer, but user code should set the appropriate size for
69 the protocol frames.
70
71 - LWS_INITIAL_HDR_ALLOC and LWS_ADDITIONAL_HDR_ALLOC are no longer needed
72 and have been removed. There's a new header management scheme that
73 handles them in a much more compact way.
Andy Greened334462013-02-07 21:14:33 +080074
75
Andy Greendf60b0c2013-02-06 19:57:12 +090076New features
77------------
78
Andy Green9b09dc02013-02-08 12:48:36 +080079 - Cmake project file added, aimed initially at Windows support: this replaces
Andy Green16ab3182013-02-10 18:02:31 +080080 the visual studio project files that were in the tree until now.
Andy Greendf60b0c2013-02-06 19:57:12 +090081
Andy Green9b09dc02013-02-08 12:48:36 +080082 - PATH_MAX or MAX_PATH no longer needed
Andy Greendf60b0c2013-02-06 19:57:12 +090083
Andy Green54495112013-02-06 21:10:16 +090084 - cutomizable frame rx buffer size by protocol
85
Andy Greena3957ef2013-02-11 09:31:43 +080086 - By default debug is enabled and the library is built for -O0 -g to faclitate
87 that. Use --disable-debug configure option to build instead with -O4
88 and no -g (debug info), obviously providing best performance and
89 reduced binary size.
Andy Green7b405452013-02-01 10:50:15 +080090
Andy Green895d56d2013-02-11 09:32:53 +080091 - 1.0 introduced some code to try to not deflate small frames, however this
92 seems to break when confronted with a mixture of frames above and
93 below the threshold, so it's removed. Veto the compression extension
94 in your user callback if you will typically have very small frames.
95
Andy Green16ab3182013-02-10 18:02:31 +080096 - There are many memory usage improvements, both a reduction in malloc/
97 realloc and architectural changes. A websocket connection now
98 consumes only 296 bytes with SSL or 272 bytes without on x86_64,
99 during header processing an additional 1262 bytes is allocated in a
100 single malloc, but is freed when the websocket connection starts.
101 The RX frame buffer defined by the protocol in user
102 code is also allocated per connection, this represents the largest
103 frame you can receive atomically in that protocol.
104
Andy Green895d56d2013-02-11 09:32:53 +0800105
Andy Greenbd1132f2013-01-31 19:53:05 +0800106v1.1-chrome26-firefox18
Andy Greena35c86f2013-01-31 10:16:44 +0800107=======================
108
109Diffstat
110--------
111
112 Makefile.am | 4 +
113 README-test-server | 291 ---
114 README.build | 239 ++
115 README.coding | 138 ++
116 README.rst | 72 -
117 README.test-apps | 272 +++
118 configure.ac | 116 +-
119 lib/Makefile.am | 55 +-
120 lib/base64-decode.c | 5 +-
121 lib/client-handshake.c | 121 +-
122 lib/client-parser.c | 394 ++++
123 lib/client.c | 807 +++++++
124 lib/daemonize.c | 212 ++
125 lib/extension-deflate-frame.c | 132 +-
126 lib/extension-deflate-stream.c | 12 +-
127 lib/extension-x-google-mux.c | 1223 ----------
128 lib/extension-x-google-mux.h | 96 -
129 lib/extension.c | 8 -
130 lib/getifaddrs.c | 271 +++
131 lib/getifaddrs.h | 76 +
132 lib/handshake.c | 582 +----
133 lib/libwebsockets.c | 2493 ++++++---------------
134 lib/libwebsockets.h | 115 +-
135 lib/md5.c | 217 --
136 lib/minilex.c | 440 ++++
137 lib/output.c | 628 ++++++
138 lib/parsers.c | 2016 +++++------------
139 lib/private-libwebsockets.h | 284 +--
140 lib/server-handshake.c | 275 +++
141 lib/server.c | 377 ++++
142 libwebsockets-api-doc.html | 300 +--
143 m4/ignore-me | 2 +
144 test-server/Makefile.am | 111 +-
145 test-server/libwebsockets.org-logo.png | Bin 0 -> 7029 bytes
146 test-server/test-client.c | 45 +-
147 test-server/test-echo.c | 330 +++
148 test-server/test-fraggle.c | 20 +-
149 test-server/test-ping.c | 22 +-
150 test-server/test-server-extpoll.c | 554 -----
151 test-server/test-server.c | 349 ++-
152 test-server/test.html | 3 +-
153 win32port/zlib/ZLib.vcxproj | 749 ++++---
154 win32port/zlib/ZLib.vcxproj.filters | 188 +-
155 win32port/zlib/adler32.c | 348 ++-
156 win32port/zlib/compress.c | 160 +-
157 win32port/zlib/crc32.c | 867 ++++----
158 win32port/zlib/crc32.h | 882 ++++----
159 win32port/zlib/deflate.c | 3799 +++++++++++++++-----------------
160 win32port/zlib/deflate.h | 688 +++---
161 win32port/zlib/gzclose.c | 50 +-
162 win32port/zlib/gzguts.h | 325 ++-
163 win32port/zlib/gzlib.c | 1157 +++++-----
164 win32port/zlib/gzread.c | 1242 ++++++-----
165 win32port/zlib/gzwrite.c | 1096 +++++----
166 win32port/zlib/infback.c | 1272 ++++++-----
167 win32port/zlib/inffast.c | 680 +++---
168 win32port/zlib/inffast.h | 22 +-
169 win32port/zlib/inffixed.h | 188 +-
170 win32port/zlib/inflate.c | 2976 +++++++++++++------------
171 win32port/zlib/inflate.h | 244 +-
172 win32port/zlib/inftrees.c | 636 +++---
173 win32port/zlib/inftrees.h | 124 +-
174 win32port/zlib/trees.c | 2468 +++++++++++----------
175 win32port/zlib/trees.h | 256 +--
176 win32port/zlib/uncompr.c | 118 +-
177 win32port/zlib/zconf.h | 934 ++++----
178 win32port/zlib/zlib.h | 3357 ++++++++++++++--------------
179 win32port/zlib/zutil.c | 642 +++---
180 win32port/zlib/zutil.h | 526 ++---
181 69 files changed, 19556 insertions(+), 20145 deletions(-)
182
183user api changes
184----------------
185
186 - libwebsockets_serve_http_file() now takes a context as first argument
187
188 - libwebsockets_get_peer_addresses() now takes a context and wsi as first
189 two arguments
190
191
192user api additions
193------------------
194
195 - lwsl_...() logging apis, default to stderr but retargetable by user code;
196 may be used also by user code
197
198 - lws_set_log_level() set which logging apis are able to emit (defaults to
199 notice, warn, err severities), optionally set the emit callback
200
201 - lwsl_emit_syslog() helper callback emits to syslog
202
203 - lws_daemonize() helper code that forks the app into a headless daemon
204 properly, maintains a lock file with pid in suitable for sysvinit etc to
205 control lifecycle
206
207 - LWS_CALLBACK_HTTP_FILE_COMPLETION callback added since http file
208 transfer is now asynchronous (see test server code)
209
210 - lws_frame_is_binary() from a wsi pointer, let you know if the received
211 data was sent in BINARY mode
212
213
214user api removals
215-----------------
216
217 - libwebsockets_fork_service_loop() - no longer supported (had intractable problems)
218 arrange your code to act from the user callback instead from same
219 process context as the service loop
220
221 - libwebsockets_broadcast() - use libwebsocket_callback_on_writable[_all_protocol]()
222 instead from same process context as the service loop. See the test apps
223 for examples.
224
225 - x-google-mux() removed until someone wants it
226
227 - pre -v13 (ancient) protocol support removed
228
229
230New features
231------------
232
233 - echo test server and client compatible with echo.websocket.org added
234
235 - many new configure options (see README.build) to reduce footprint of the
236 library to what you actually need, eg, --without-client and
237 --without-server
238
239 - http + websocket server can build to as little as 12K .text for ARM
240
241 - no more MAX_CLIENTS limitation; adapts to support the max number of fds
242 allowed to the process by ulimit, defaults to 1024 on Fedora and
243 Ubuntu. Use ulimit to control this without needing to configure
244 the library. Code here is smaller and faster.
245
246 - adaptive ratio of listen socket to connection socket service allows
247 good behaviour under Apache ab test load. Tested with thousands
248 of simultaneous connections
249
250 - reduction in per-connection memory footprint by moving to a union to hold
251 mutually-exclusive state for the connection
252
253 - robustness: Out of Memory taken care of for all allocation code now
254
255 - internal getifaddrs option if your toolchain lacks it (some uclibc)
256
257 - configurable memory limit for deflate operations
258
259 - improvements in SSL code nonblocking operation, possible hang solved,
260 some SSL operations broken down into pollable states so there is
261 no library blocking, timeout coverage for SSL_connect
262
263 - extpoll test server merged into single test server source
264
265 - robustness: library should deal with all recoverable socket conditions
266
267 - rx flowcontrol for backpressure notification fixed and implmeneted
268 correctly in the test server
269
270 - optimal lexical parser added for header processing; all headers in a
271 single 276-byte state table
272
273 - latency tracking api added (configure --with-latency)
274
275 - Improved in-tree documentation, REAME.build, README.coding,
276 README.test-apps, changelog
277
278 - Many small fixes
279
280
281v1.0-chrome25-firefox17 (6cd1ea9b005933f)