blob: a6e0b5879b381ea4d38be83b8bfe150e7da170f9 [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
57
58User api removals
59-----------------
60
61The configuration-time option MAX_USER_RX_BUFFER has been replaced by a
62buffer size chosen per-protocol. For compatibility, there's a default of
634096 rx buffer, but user code should set the appropriate size for the
64protocol frames.
Andy Greened334462013-02-07 21:14:33 +080065
66
Andy Greendf60b0c2013-02-06 19:57:12 +090067New features
68------------
69
Andy Green9b09dc02013-02-08 12:48:36 +080070 - Cmake project file added, aimed initially at Windows support: this replaces
Andy Greendf60b0c2013-02-06 19:57:12 +090071the visual studio project files that were in the tree until now.
72
Andy Green9b09dc02013-02-08 12:48:36 +080073 - PATH_MAX or MAX_PATH no longer needed
Andy Greendf60b0c2013-02-06 19:57:12 +090074
Andy Green54495112013-02-06 21:10:16 +090075 - cutomizable frame rx buffer size by protocol
76
Andy Greena3957ef2013-02-11 09:31:43 +080077 - By default debug is enabled and the library is built for -O0 -g to faclitate
78 that. Use --disable-debug configure option to build instead with -O4
79 and no -g (debug info), obviously providing best performance and
80 reduced binary size.
Andy Green7b405452013-02-01 10:50:15 +080081
Andy Green895d56d2013-02-11 09:32:53 +080082 - 1.0 introduced some code to try to not deflate small frames, however this
83 seems to break when confronted with a mixture of frames above and
84 below the threshold, so it's removed. Veto the compression extension
85 in your user callback if you will typically have very small frames.
86
87
Andy Greenbd1132f2013-01-31 19:53:05 +080088v1.1-chrome26-firefox18
Andy Greena35c86f2013-01-31 10:16:44 +080089=======================
90
91Diffstat
92--------
93
94 Makefile.am | 4 +
95 README-test-server | 291 ---
96 README.build | 239 ++
97 README.coding | 138 ++
98 README.rst | 72 -
99 README.test-apps | 272 +++
100 configure.ac | 116 +-
101 lib/Makefile.am | 55 +-
102 lib/base64-decode.c | 5 +-
103 lib/client-handshake.c | 121 +-
104 lib/client-parser.c | 394 ++++
105 lib/client.c | 807 +++++++
106 lib/daemonize.c | 212 ++
107 lib/extension-deflate-frame.c | 132 +-
108 lib/extension-deflate-stream.c | 12 +-
109 lib/extension-x-google-mux.c | 1223 ----------
110 lib/extension-x-google-mux.h | 96 -
111 lib/extension.c | 8 -
112 lib/getifaddrs.c | 271 +++
113 lib/getifaddrs.h | 76 +
114 lib/handshake.c | 582 +----
115 lib/libwebsockets.c | 2493 ++++++---------------
116 lib/libwebsockets.h | 115 +-
117 lib/md5.c | 217 --
118 lib/minilex.c | 440 ++++
119 lib/output.c | 628 ++++++
120 lib/parsers.c | 2016 +++++------------
121 lib/private-libwebsockets.h | 284 +--
122 lib/server-handshake.c | 275 +++
123 lib/server.c | 377 ++++
124 libwebsockets-api-doc.html | 300 +--
125 m4/ignore-me | 2 +
126 test-server/Makefile.am | 111 +-
127 test-server/libwebsockets.org-logo.png | Bin 0 -> 7029 bytes
128 test-server/test-client.c | 45 +-
129 test-server/test-echo.c | 330 +++
130 test-server/test-fraggle.c | 20 +-
131 test-server/test-ping.c | 22 +-
132 test-server/test-server-extpoll.c | 554 -----
133 test-server/test-server.c | 349 ++-
134 test-server/test.html | 3 +-
135 win32port/zlib/ZLib.vcxproj | 749 ++++---
136 win32port/zlib/ZLib.vcxproj.filters | 188 +-
137 win32port/zlib/adler32.c | 348 ++-
138 win32port/zlib/compress.c | 160 +-
139 win32port/zlib/crc32.c | 867 ++++----
140 win32port/zlib/crc32.h | 882 ++++----
141 win32port/zlib/deflate.c | 3799 +++++++++++++++-----------------
142 win32port/zlib/deflate.h | 688 +++---
143 win32port/zlib/gzclose.c | 50 +-
144 win32port/zlib/gzguts.h | 325 ++-
145 win32port/zlib/gzlib.c | 1157 +++++-----
146 win32port/zlib/gzread.c | 1242 ++++++-----
147 win32port/zlib/gzwrite.c | 1096 +++++----
148 win32port/zlib/infback.c | 1272 ++++++-----
149 win32port/zlib/inffast.c | 680 +++---
150 win32port/zlib/inffast.h | 22 +-
151 win32port/zlib/inffixed.h | 188 +-
152 win32port/zlib/inflate.c | 2976 +++++++++++++------------
153 win32port/zlib/inflate.h | 244 +-
154 win32port/zlib/inftrees.c | 636 +++---
155 win32port/zlib/inftrees.h | 124 +-
156 win32port/zlib/trees.c | 2468 +++++++++++----------
157 win32port/zlib/trees.h | 256 +--
158 win32port/zlib/uncompr.c | 118 +-
159 win32port/zlib/zconf.h | 934 ++++----
160 win32port/zlib/zlib.h | 3357 ++++++++++++++--------------
161 win32port/zlib/zutil.c | 642 +++---
162 win32port/zlib/zutil.h | 526 ++---
163 69 files changed, 19556 insertions(+), 20145 deletions(-)
164
165user api changes
166----------------
167
168 - libwebsockets_serve_http_file() now takes a context as first argument
169
170 - libwebsockets_get_peer_addresses() now takes a context and wsi as first
171 two arguments
172
173
174user api additions
175------------------
176
177 - lwsl_...() logging apis, default to stderr but retargetable by user code;
178 may be used also by user code
179
180 - lws_set_log_level() set which logging apis are able to emit (defaults to
181 notice, warn, err severities), optionally set the emit callback
182
183 - lwsl_emit_syslog() helper callback emits to syslog
184
185 - lws_daemonize() helper code that forks the app into a headless daemon
186 properly, maintains a lock file with pid in suitable for sysvinit etc to
187 control lifecycle
188
189 - LWS_CALLBACK_HTTP_FILE_COMPLETION callback added since http file
190 transfer is now asynchronous (see test server code)
191
192 - lws_frame_is_binary() from a wsi pointer, let you know if the received
193 data was sent in BINARY mode
194
195
196user api removals
197-----------------
198
199 - libwebsockets_fork_service_loop() - no longer supported (had intractable problems)
200 arrange your code to act from the user callback instead from same
201 process context as the service loop
202
203 - libwebsockets_broadcast() - use libwebsocket_callback_on_writable[_all_protocol]()
204 instead from same process context as the service loop. See the test apps
205 for examples.
206
207 - x-google-mux() removed until someone wants it
208
209 - pre -v13 (ancient) protocol support removed
210
211
212New features
213------------
214
215 - echo test server and client compatible with echo.websocket.org added
216
217 - many new configure options (see README.build) to reduce footprint of the
218 library to what you actually need, eg, --without-client and
219 --without-server
220
221 - http + websocket server can build to as little as 12K .text for ARM
222
223 - no more MAX_CLIENTS limitation; adapts to support the max number of fds
224 allowed to the process by ulimit, defaults to 1024 on Fedora and
225 Ubuntu. Use ulimit to control this without needing to configure
226 the library. Code here is smaller and faster.
227
228 - adaptive ratio of listen socket to connection socket service allows
229 good behaviour under Apache ab test load. Tested with thousands
230 of simultaneous connections
231
232 - reduction in per-connection memory footprint by moving to a union to hold
233 mutually-exclusive state for the connection
234
235 - robustness: Out of Memory taken care of for all allocation code now
236
237 - internal getifaddrs option if your toolchain lacks it (some uclibc)
238
239 - configurable memory limit for deflate operations
240
241 - improvements in SSL code nonblocking operation, possible hang solved,
242 some SSL operations broken down into pollable states so there is
243 no library blocking, timeout coverage for SSL_connect
244
245 - extpoll test server merged into single test server source
246
247 - robustness: library should deal with all recoverable socket conditions
248
249 - rx flowcontrol for backpressure notification fixed and implmeneted
250 correctly in the test server
251
252 - optimal lexical parser added for header processing; all headers in a
253 single 276-byte state table
254
255 - latency tracking api added (configure --with-latency)
256
257 - Improved in-tree documentation, REAME.build, README.coding,
258 README.test-apps, changelog
259
260 - Many small fixes
261
262
263v1.0-chrome25-firefox17 (6cd1ea9b005933f)