changelog 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. Changelog
  2. ---------
  3. v2.1.0
  4. ======
  5. Major new features
  6. - Support POST arguments, including multipart and file attachment
  7. - Move most of lwsws into lws, make the stub CC0
  8. - Add loopback test plugin to confirm client ws / http coexistence
  9. - Integrate lwsws testing on Appveyor (ie, windows)
  10. - Introduce helpers for sql, urlencode and urldecode sanitation
  11. - Introduce LWS_CALLBACK_HTTP_BIND_PROTOCOL / DROP_PROTOCOL that
  12. are compatible with http:/1.1 pipelining and different plugins
  13. owning different parts of the URL space
  14. - lwsgs - Generic Sessions plugin supports serverside sessions,
  15. cookies, hashed logins, forgot password etc
  16. - Added APIs for sending email to SMTP servers
  17. - Messageboard example plugin for lwsgs
  18. - Automatic PING sending at fixed intervals and close if no response
  19. - Change default header limit in ah to 4096 (from 1024)
  20. - Add SNI matching for wildcards if no specific wildcard vhost name match
  21. - Convert docs to Doxygen
  22. - ESP8266 support ^^
  23. Fixes
  24. -----
  25. See git log v2.0.0..
  26. v2.0.0
  27. ======
  28. Summary
  29. -------
  30. - There are only api additions, the api is compatible with v1.7.x. But
  31. there is necessarily an soname bump to 8.
  32. - If you are using lws client, you mainly need to be aware the option
  33. LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT is needed at context-creation time
  34. if you will use SSL.
  35. - If you are using lws for serving, the above is also true but there are
  36. many new features to simplify your code (and life). There is a
  37. summany online here
  38. https://libwebsockets.org/lws-2.0-new-features.html
  39. but basically the keywords are vhosts, mounts and plugins. You can now
  40. do the web serving part from lws without any user callback code at all.
  41. See ./test-server/test-server-v2.0.c for an example, it has no user
  42. code for ws either since it uses the protocol plugins... that one C file
  43. is all that is needed to do the whole test server function.
  44. You now have the option to use a small generic ws-capable webserver
  45. "lwsws" and write your ws part as a plugin. That eliminates even
  46. cut-and-pasting the test server code and offers more configurable
  47. features like control over http cacheability in JSON.
  48. Fixes
  49. -----
  50. These are already in 1.7.x series
  51. 1) MAJOR (Windows-only) fix assert firing
  52. 2) MAJOR http:/1.1 connections handled by lws_return_http_status() did not
  53. get sent a content-length resulting in the link hanging until the peer closed
  54. it. attack.sh updated to add a test for this.
  55. 3) MINOR An error about hdr struct in _lws_ws_related is corrected, it's not
  56. known to affect anything until after it was fixed
  57. 4) MINOR During the close shutdown wait state introduced at v1.7, if something
  58. requests callback on writeable for the socket it will busywait until the
  59. socket closes
  60. 5) MAJOR Although the test server has done it for a few versions already, it
  61. is now required for the user code to explicitly call
  62. if (lws_http_transaction_completed(wsi))
  63. return -1;
  64. when it finishes replying to a transaction in http. Previously the library
  65. did it for you, but that disallowed large, long transfers with multiple
  66. trips around the event loop (and cgi...).
  67. 6) MAJOR connections on ah waiting list that closed did not get removed from
  68. the waiting list...
  69. 7) MAJOR since we added the ability to hold an ah across http keepalive
  70. transactions where more headers had already arrived, we broke the ability
  71. to tell if more headers had arrived. Result was if the browser didn't
  72. close the keepalive, we retained ah for the lifetime of the keepalive,
  73. using up the pool.
  74. 8) MAJOR windows-only-POLLHUP was not coming
  75. 9) Client should not send ext hdr if no exts
  76. Changes
  77. -------
  78. 1) MINOR test-server gained some new switches
  79. -C <file> use external SSL cert file
  80. -K <file> use external SSL key file
  81. -A <file> use external SSL CA cert file
  82. -u <uid> set effective uid
  83. -g <gid> set effective gid
  84. together you can use them like this to have the test-server work with the
  85. usual purchased SSL certs from an official CA.
  86. --ssl -C your.crt -K your.key -A your.cer -u 99 -g 99
  87. 2) MINOR the OpenSSL magic to setup ECDH cipher usage is implemented in the
  88. library, and the ciphers restricted to use ECDH only.
  89. Using this, the lws test server can score an A at SSLLABS test
  90. 3) MINOR STS (SSL always) header is added to the test server if you use --ssl. With
  91. that, we score A+ at SSLLABS test
  92. 4) MINOR daemonize function (disabled at cmake by default) is updated to work
  93. with systemd
  94. 5) MINOR example systemd .service file now provided for test server
  95. (not installed by default)
  96. 6) test server html is updated with tabs and a new live server monitoring
  97. feature. Input sanitization added to the js.
  98. 7) client connections attempted when no ah is free no longer fail, they are
  99. just deferred until an ah becomes available.
  100. 8) The test client pays attention to if you give it an http:/ or https://
  101. protocol string to its argument in URL format. If so, it stays in http[s]
  102. client mode and doesn't upgrade to ws[s], allowing you to do generic http client
  103. operations. Receiving transfer-encoding: chunked is supported.
  104. 9) If you enable -DLWS_WITH_HTTP_PROXY=1 at cmake, the test server has a
  105. new URI path http://localhost:7681/proxytest If you visit here, a client
  106. connection to http://example.com:80 is spawned, and the results piped on
  107. to your original connection.
  108. 10) Also with LWS_WITH_HTTP_PROXY enabled at cmake, lws wants to link to an
  109. additional library, "libhubbub". This allows lws to do html rewriting on the
  110. fly, adjusting proxied urls in a lightweight and fast way.
  111. 11) There's a new context creation flag LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT,
  112. this is included automatically if you give any other SSL-related option flag.
  113. If you give no SSL-related option flag, nor this one directly, then even
  114. though SSL support may be compiled in, it is never initialized nor used for the
  115. whole lifetime of the lws context.
  116. Conversely in order to prepare the context to use SSL, even though, eg, you
  117. are not listening on SSL but will use SSL client connections later, you must
  118. give this flag explicitly to make sure SSL is initialized.
  119. User API additions
  120. ------------------
  121. 1) MINOR APIBREAK There's a new member in struct lws_context_creation_info, ecdh_curve,
  122. which lets you set the name of the ECDH curve OpenSSL should use. By
  123. default (if you leave ecdh_curve NULL) it will use "prime256v1"
  124. 2) MINOR NEWAPI It was already possible to adopt a foreign socket that had not
  125. been read from using lws_adopt_socket() since v1.7. Now you can adopt a
  126. partially-used socket if you don't need SSL, by passing it what you read
  127. so it can drain that before reading from the socket.
  128. LWS_VISIBLE LWS_EXTERN struct lws *
  129. lws_adopt_socket_readbuf(struct lws_context *context, lws_sockfd_type accept_fd,
  130. const char *readbuf, size_t len);
  131. 3) MINOR NEWAPI CGI type "network io" subprocess execution is now possible from
  132. a simple api.
  133. LWS_VISIBLE LWS_EXTERN int
  134. lws_cgi(struct lws *wsi, char * const *exec_array, int script_uri_path_len,
  135. int timeout_secs);
  136. LWS_VISIBLE LWS_EXTERN int
  137. lws_cgi_kill(struct lws *wsi);
  138. To use it, you must first set the cmake option
  139. $ cmake .. -DLWS_WITH_CGI=1
  140. See test-server-http.c and test server path
  141. http://localhost:7681/cgitest
  142. stdin gets http body, you can test it with wget
  143. $ echo hello > hello.txt
  144. $ wget http://localhost:7681/cgitest --post-file=hello.txt -O- --quiet
  145. lwstest script
  146. read="hello"
  147. The test script returns text/html table showing /proc/meminfo. But the cgi
  148. support is complete enough to run cgit cgi.
  149. 4) There is a helper api for forming logging timestamps
  150. LWS_VISIBLE int
  151. lwsl_timestamp(int level, char *p, int len)
  152. this generates this kind of timestamp for use as logging preamble
  153. lwsts[13116]: [2016/01/25 14:52:52:8386] NOTICE: Initial logging level 7
  154. 5) struct lws_client_connect_info has a new member
  155. const char *method
  156. If it's NULL, then everything happens as before, lws_client_connect_via_info()
  157. makes a ws or wss connection to the address given.
  158. If you set method to a valid http method like "GET", though, then this method
  159. is used and the connection remains in http[s], it's not upgraded to ws[s].
  160. So with this, you can perform http[s] client operations as well as ws[s] ones.
  161. There are 4 new related callbacks
  162. LWS_CALLBACK_ESTABLISHED_CLIENT_HTTP = 44,
  163. LWS_CALLBACK_CLOSED_CLIENT_HTTP = 45,
  164. LWS_CALLBACK_RECEIVE_CLIENT_HTTP = 46,
  165. LWS_CALLBACK_COMPLETED_CLIENT_HTTP = 47,
  166. 6) struct lws_client_connect_info has a new member
  167. const char *parent_wsi
  168. if non-NULL, the client wsi is set to be a child of parent_wsi. This ensures
  169. if parent_wsi closes, then the client child is closed just before.
  170. 7) If you're using SSL, there's a new context creation-time option flag
  171. LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS. If you give this, non-ssl
  172. connections to the server listen port are accepted and receive a 301
  173. redirect to / on the same host and port using https://
  174. 8) User code may set per-connection extension options now, using a new api
  175. "lws_set_extension_option()".
  176. This should be called from the ESTABLISHED callback like this
  177. lws_set_extension_option(wsi, "permessage-deflate",
  178. "rx_buf_size", "12"); /* 1 << 12 */
  179. If the extension is not active (missing or not negotiated for the
  180. connection, or extensions are disabled on the library) the call is
  181. just returns -1. Otherwise the connection's extension has its
  182. named option changed.
  183. The extension may decide to alter or disallow the change, in the
  184. example above permessage-deflate restricts the size of his rx
  185. output buffer also considering the protocol's rx_buf_size member.
  186. New application lwsws
  187. ---------------------
  188. A libwebsockets-based general webserver is built by default now, lwsws.
  189. It's configured by JSON, by default in
  190. /etc/lwsws/conf
  191. which contains global lws context settings like this
  192. {
  193. "global": {
  194. "uid": "99",
  195. "gid": "99",
  196. "interface": "eth0",
  197. "count-threads": "1"
  198. }
  199. }
  200. /etc/lwsws/conf.d/*
  201. which contains zero or more files describing vhosts, like this
  202. {
  203. "vhosts": [
  204. { "name": "warmcat.com",
  205. "port": "443",
  206. "host-ssl-key": "/etc/pki/tls/private/warmcat.com.key",
  207. "host-ssl-cert": "/etc/pki/tls/certs/warmcat.com.crt",
  208. "host-ssl-ca": "/etc/pki/tls/certs/warmcat.com.cer",
  209. "mounts": [
  210. { "/": [
  211. { "home": "file:///var/www/warmcat.com" },
  212. { "default": "index.html" }
  213. ]
  214. }
  215. ]
  216. }
  217. ]
  218. }
  219. v1.7.0
  220. ======
  221. Extension Changes
  222. -----------------
  223. 1) There is now a "permessage-deflate" / RFC7692 implementation. It's very
  224. similar to "deflate-frame" we have offered for a long while; deflate-frame is
  225. now provided as an alias of permessage-deflate.
  226. The main differences are that the new permessage-deflate implementation:
  227. - properly performs streaming respecting input and output buffer limits. The
  228. old deflate-frame implementation could only work on complete deflate input
  229. and produce complete inflate output for each frame. The new implementation
  230. only mallocs buffers at initialization.
  231. - goes around the event loop after each input package is processed allowing
  232. interleaved output processing. The RX flow control api can be used to
  233. force compressed input processing to match the rate of compressed output
  234. processing (test--echo shows an example of how to do this).
  235. - when being "deflate-frame" for compatibility he uses the same default zlib
  236. settings as the old "deflate-frame", but instead of exponentially increasing
  237. malloc allocations until the whole output will fit, he observes the default
  238. input and output chunking buffer sizes of "permessage-deflate", that's
  239. 1024 in and 1024 out at a time.
  240. 2) deflate-stream has been disabled for many versions (for over a year) and is
  241. now removed. Browsers are now standardizing on "permessage-deflate" / RFC7692
  242. 3) struct lws_extension is simplified, and lws extensions now have a public
  243. api (their callback) for use in user code to compose extensions and options
  244. the user code wants. lws_get_internal_exts() is deprecated but kept around
  245. as a NOP. The changes allow one extension implementation to go by different
  246. names and allows the user client code to control option offers per-ext.
  247. The test client and server are updated to use the new way. If you use
  248. the old way it should still work, but extensions will be disabled until you
  249. update your code.
  250. Extensions are now responsible for allocating and per-instance private struct
  251. at instance construction time and freeing it when the instance is destroyed.
  252. Not needing to know the size means the extension's struct can be opaque
  253. to user code.
  254. User api additions
  255. ------------------
  256. 1) The info struct gained three new members
  257. - max_http_header_data: 0 for default (1024) or set the maximum amount of known
  258. http header payload that lws can deal with. Payload in unknown http
  259. headers is dropped silently. If for some reason you need to send huge
  260. cookies or other HTTP-level headers, you can now increase this at context-
  261. creation time.
  262. - max_http_header_pool: 0 for default (16) or set the maximum amount of http
  263. headers that can be tracked by lws in this context. For the server, if
  264. the header pool is completely in use then accepts on the listen socket
  265. are disabled until one becomes free. For the client, if you simultaneously
  266. have pending connects for more than this number of client connections,
  267. additional connects will fail until some of the pending connections timeout
  268. or complete.
  269. - timeout_secs: 0 for default (currently 20s), or set the library's
  270. network activity timeout to the given number of seconds
  271. HTTP header processing in lws only exists until just after the first main
  272. callback after the HTTP handshake... for ws connections that is ESTABLISHED and
  273. for HTTP connections the HTTP callback.
  274. So these settings are not related to the maximum number of simultaneous
  275. connections, but the number of HTTP handshakes that may be expected or ongoing,
  276. or have just completed, at one time. The reason it's useful is it changes the
  277. memory allocation for header processing to be one-time at context creation
  278. instead of every time there is a new connection, and gives you control over
  279. the peak allocation.
  280. Setting max_http_header_pool to 1 is fine it will just queue incoming
  281. connections before the accept as necessary, you can still have as many
  282. simultaneous post-header connections as you like. Since the http header
  283. processing is completed and the allocation released after ESTABLISHED or the
  284. HTTP callback, even with a pool of 1 many connections can be handled rapidly.
  285. 2) There is a new callback that allows the user code to get acccess to the
  286. optional close code + aux data that may have been sent by the peer.
  287. LWS_CALLBACK_WS_PEER_INITIATED_CLOSE:
  288. The peer has sent an unsolicited Close WS packet. @in and
  289. @len are the optional close code (first 2 bytes, network
  290. order) and the optional additional information which is not
  291. defined in the standard, and may be a string or non-human-
  292. readble data.
  293. If you return 0 lws will echo the close and then close the
  294. connection. If you return nonzero lws will just close the
  295. connection.
  296. As usual not handling it does the right thing, if you're not interested in it
  297. just ignore it.
  298. The test server has "open and close" testing buttons at the bottom, if you
  299. open and close that connection, on close it will send a close code 3000 decimal
  300. and the string "Bye!" as the aux data.
  301. The test server dumb-increment callback handles this callback reason and prints
  302. lwsts[15714]: LWS_CALLBACK_WS_PEER_INITIATED_CLOSE: len 6
  303. lwsts[15714]: 0: 0x0B
  304. lwsts[15714]: 1: 0xB8
  305. lwsts[15714]: 2: 0x42
  306. lwsts[15714]: 3: 0x79
  307. lwsts[15714]: 4: 0x65
  308. lwsts[15714]: 5: 0x21
  309. 3) There is a new API to allow the user code to control the content of the
  310. close frame sent when about to return nonzero from the user callback to
  311. indicate the connection should close.
  312. /**
  313. * lws_close_reason - Set reason and aux data to send with Close packet
  314. * If you are going to return nonzero from the callback
  315. * requesting the connection to close, you can optionally
  316. * call this to set the reason the peer will be told if
  317. * possible.
  318. *
  319. * @wsi: The websocket connection to set the close reason on
  320. * @status: A valid close status from websocket standard
  321. * @buf: NULL or buffer containing up to 124 bytes of auxiliary data
  322. * @len: Length of data in @buf to send
  323. */
  324. LWS_VISIBLE LWS_EXTERN void
  325. lws_close_reason(struct lws *wsi, enum lws_close_status status,
  326. unsigned char *buf, size_t len);
  327. An extra button is added to the "open and close" test server page that requests
  328. that the test server close the connection from his end.
  329. The test server code will do so by
  330. lws_close_reason(wsi, LWS_CLOSE_STATUS_GOINGAWAY,
  331. (unsigned char *)"seeya", 5);
  332. return -1;
  333. The browser shows the close code and reason he received
  334. websocket connection CLOSED, code: 1001, reason: seeya
  335. 4) There's a new context creation time option flag
  336. LWS_SERVER_OPTION_VALIDATE_UTF8
  337. if you set it in info->options, then TEXT and CLOSE frames will get checked to
  338. confirm that they contain valid UTF-8. If they don't, the connection will get
  339. closed by lws.
  340. 5) ECDH Certs are now supported. Enable the CMake option
  341. cmake .. -DLWS_SSL_SERVER_WITH_ECDH_CERT=1
  342. **and** the info->options flag
  343. LWS_SERVER_OPTION_SSL_ECDH
  344. to build in support and select it at runtime.
  345. 6) There's a new api lws_parse_uri() that simplifies chopping up
  346. https://xxx:yyy/zzz uris into parts nicely. The test client now uses this
  347. to allow proper uris as well as the old address style.
  348. 7) SMP support is integrated into LWS without any internal threading. It's
  349. very simple to use, libwebsockets-test-server-pthread shows how to do it,
  350. use -j <n> argument there to control the number of service threads up to 32.
  351. Two new members are added to the info struct
  352. unsigned int count_threads;
  353. unsigned int fd_limit_per_thread;
  354. leave them at the default 0 to get the normal singlethreaded service loop.
  355. Set count_threads to n to tell lws you will have n simultaneous service threads
  356. operating on the context.
  357. There is still a single listen socket on one port, no matter how many
  358. service threads.
  359. When a connection is made, it is accepted by the service thread with the least
  360. connections active to perform load balancing.
  361. The user code is responsible for spawning n threads running the service loop
  362. associated to a specific tsi (Thread Service Index, 0 .. n - 1). See
  363. the libwebsockets-test-server-pthread for how to do.
  364. If you leave fd_limit_per_thread at 0, then the process limit of fds is shared
  365. between the service threads; if you process was allowed 1024 fds overall then
  366. each thread is limited to 1024 / n.
  367. You can set fd_limit_per_thread to a nonzero number to control this manually, eg
  368. the overall supported fd limit is less than the process allowance.
  369. You can control the context basic data allocation for multithreading from Cmake
  370. using -DLWS_MAX_SMP=, if not given it's set to 32. The serv_buf allocation
  371. for the threads (currently 4096) is made at runtime only for active threads.
  372. Because lws will limit the requested number of actual threads supported
  373. according to LWS_MAX_SMP, there is an api lws_get_count_threads(context) to
  374. discover how many threads were actually allowed when the context was created.
  375. It's required to implement locking in the user code in the same way that
  376. libwebsockets-test-server-pthread does it, for the FD locking callbacks.
  377. If LWS_MAX_SMP=1, then there is no code related to pthreads compiled in the
  378. library. If more than 1, a small amount of pthread mutex code is built into
  379. the library.
  380. 8) New API
  381. LWS_VISIBLE struct lws *
  382. lws_adopt_socket(struct lws_context *context, lws_sockfd_type accept_fd)
  383. allows foreign sockets accepted by non-lws code to be adopted by lws as if they
  384. had just been accepted by lws' own listen socket.
  385. 9) X-Real-IP: header has been added as WSI_TOKEN_HTTP_X_REAL_IP
  386. 10) Libuv support is added, there are new related user apis
  387. typedef void (lws_uv_signal_cb_t)(uv_loop_t *l, uv_signal_t *w, int revents);
  388. LWS_VISIBLE LWS_EXTERN int
  389. lws_uv_sigint_cfg(struct lws_context *context, int use_uv_sigint,
  390. lws_uv_signal_cb_t *cb);
  391. LWS_VISIBLE LWS_EXTERN int
  392. lws_uv_initloop(struct lws_context *context, uv_loop_t *loop, int tsi);
  393. LWS_VISIBLE void
  394. lws_uv_sigint_cb(uv_loop_t *loop, uv_signal_t *watcher, int revents);
  395. and CMAKE option
  396. LWS_WITH_LIBUV
  397. User api changes
  398. ----------------
  399. 1) LWS_SEND_BUFFER_POST_PADDING is now 0 and deprecated. You can remove it; if
  400. you still use it, obviously it does nothing. Old binary code with nonzero
  401. LWS_SEND_BUFFER_POST_PADDING is perfectly compatible, the old code just
  402. allocated a buffer bigger than the library is going to use.
  403. The example apps no longer use LWS_SEND_BUFFER_POST_PADDING.
  404. The only path who made use of it was sending with LWS_WRITE_CLOSE --->
  405. 2) Because of lws_close_reason() formalizing handling close frames,
  406. LWS_WRITE_CLOSE is removed from libwebsockets.h. It was only of use to send
  407. close frames...close frame content should be managed using lws_close_reason()
  408. now.
  409. 3) We check for invalid CLOSE codes and complain about protocol violation in
  410. our close code. But it changes little since we were in the middle of closing
  411. anyway.
  412. 4) zero-length RX frames and zero length TX frames are now allowed.
  413. 5) Pings and close used to be limited to 124 bytes, the correct limit is 125
  414. so that is now also allowed.
  415. 6) LWS_PRE is provided as a synonym for LWS_SEND_BUFFER_PRE_PADDING, either is
  416. valid to use now.
  417. 7) There's generic support for RFC7462 style extension options built into the
  418. library now. As a consequence, a field "options" is added to lws_extension.
  419. It can be NULL if there are no options on the extension. Extension internal
  420. info is part of the public abi because extensions may be implemented outside
  421. the library.
  422. 8) WSI_TOKEN_PROXY enum was accidentally defined to collide with another token
  423. of value 73. That's now corrected and WSI_TOKEN_PROXY moved to his own place at
  424. 77.
  425. 9) With the addition of libuv support, libev is not the only event loop
  426. library in town and his api names must be elaborated with _ev_
  427. Callback typedef: lws_signal_cb ---> lws_ev_signal_cb_t
  428. lws_sigint_cfg --> lws_ev_sigint_cfg
  429. lws_initloop --> lws_ev_initloop
  430. lws_sigint_cb --> lws_ev_sigint_cb
  431. 10) Libev support is made compatible with multithreaded service,
  432. lws_ev_initloop (was lws_initloop) gets an extra argument for the
  433. thread service index (use 0 if you will just have 1 service thread).
  434. LWS_VISIBLE LWS_EXTERN int
  435. lws_ev_initloop(struct lws_context *context, ev_loop_t *loop, int tsi);
  436. (for earlier changelogs, see the tagged releases)