1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00
Commit graph

44 commits

Author SHA1 Message Date
Andy Green
a3957ef804 stop O2 override
Now we are building with -O0 -g and debug enabled by default.
--disable-debug in configure will get you a -04 without -g

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-11 09:31:43 +08:00
Andy Green
5f348a80a0 add static stack analysis
You can get a worst-first list of stack allocators like this

$ cat ./lib/.libs/*.su | sort -k2g | tac

On x86_64, currently the ones above 100 bytes are

server.c:126:5:lws_server_socket_service	4208	static
client.c:42:5:lws_client_socket_service	1584	static
libwebsockets.c:1539:1:libwebsocket_create_context	1136	static
libwebsockets.c:783:1:libwebsocket_service_fd	656	static
client-handshake.c:3:22:__libwebsocket_client_connect_2	592	static
libwebsockets.c:2149:6:_lws_log	496	static
server-handshake.c:33:1:handshake_0405	464	static
libwebsockets.c:2102:13:lwsl_emit_stderr	352	static
client.c:351:1:lws_client_interpret_server_handshake	240	static
daemonize.c:93:1:lws_daemonize	224	static
libwebsockets.c:434:1:libwebsockets_get_peer_addresses	208	static
client.c:694:1:libwebsockets_generate_client_handshake	208	static
output.c:534:5:libwebsockets_serve_http_file	192	static
output.c:51:6:lwsl_hexdump	176	static
sha-1.c:316:1:SHA1	160	static
libwebsockets.c:157:1:libwebsocket_close_and_free_session	144	static

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-10 10:49:15 +08:00
Peter Pentchev
4d46cb5a3f Generate the API reference in text format, too. 2013-02-07 23:36:37 +08:00
Andy Green
23c5f2ecd0 add autotools bits for cyassl
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-07 20:30:56 +08:00
Andy Green
7b40545e92 introduce library version plus git hash
This exposes the library version and git head hash it was built from
into LWS_LIBRARY_VERSION and LWS_BUILD_HASH.

These are combined into a version string that's both printed as a
notice log by the library and made available to the app using a new
api lws_get_library_version().  The version looks like

 1.1 178d78c

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-01 10:50:15 +08:00
Andy Green
2da89dccb0 bump version to 1.1 and soname to 2
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-31 11:01:38 +08:00
Andy Green
d88146da6a trac 3 document write and context_user
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-22 23:09:01 +08:00
Andy Green
bdd6bf3ccd bind gcc debug generation to_DEBUG
Either generate debug sections in output or optimize aggressively,
controlled by the existing --disable-debug

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-21 12:19:30 +08:00
Andy Green
5738c0e838 remove all support for pre v13 protocols
Since v13 was defined as the released ietf version the older versions
are deprecated.  This patch strips out everything to do with the older
versions and gets rid of the option to send stuff unmasked.

The in-tree md5 implementation is then also deleted as nothing needs
it any more, 1280 loc are shed in all

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-21 09:53:35 +08:00
Andy Green
13ba5bbc63 zlib not needed if no extensions
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-20 18:26:20 +08:00
Andy Green
3182ece3a4 introduce without extensions
The new --without-extensions config flag completely removes all code
and data related to extensions from the build throughout the library
when given.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-20 17:08:31 +08:00
Andy Green
a1ce6be947 refactor and introduce without server configure option
Move server-only stuff into their own files and make building
that depend on not having --without-server on the configure

Make fragments in other places conditional as well

Remove client-related members from struct libwebscket when
building LWS_NO_CLIENT

Apps:

normal: build test server, client, fraggle, ping
--without-client: build test server
--without-server: build test client, ping

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-18 11:43:21 +08:00
Andy Green
4a673a38ca deprecate x google mux
Unfortunately this code is beginning to rot due to lack of demand to
provide it and it being disabled by default.

If demand appears we can revert this and resume work on it, otherwise
let's bite the bullet for the moment.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-17 19:53:16 +08:00
Andy Green
706961dbb5 solve flowcontrol problems
Problems with rx flow control implementation were the underlying cause
of the connection stalling issue that was covered up with the udelay()
patch that was removed recently.

This get rx flow control working properly and corrects problems with
fifo management in the test server mirror protocol code too.

The rxfow control api has been changed to just set a flag, so it's very cheap
to call from user code.  After the callbacks that might use the rxflow control
api the flag is checked and any pending actions done.

rx flow control now stops any rx packet coming immediately, with compessed
connections "just what was left in the pipe" might be hundreds of KBytes.  To
implement that the current packet being decoded is copied into a malloc'd buffer
by the rx processing code now.

When rxflow is allows to come again, the buffer is drained and freed before any
new packet content is accepted.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-17 17:18:55 +08:00
Andy Green
279a303662 introduce daemonize
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-17 10:05:39 +08:00
Andy Green
03674a655d configure without client
This leverages the refactor patches to introduce the ability to
disable building any client side code in the library or the client
side test apps.

This will be a considerable size saving for embedded server-only
case.

Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-16 12:35:46 +08:00
Andy Green
b429d48cf1 refactor output.c
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-16 12:34:56 +08:00
Andy Green
76f61e7ade refactor migrate client stuff to client.c
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-16 11:53:05 +08:00
David
c4ef7b1609 introduce getifaddrs for toolchains without it
David found that uclibc did not provide this slightly esoteric api
and provided one from BSD that can be built by the library internally.

AG: Made contingent on configure option --enable-builtin-getifaddrs

Signed-off-by: David <cymerio@gmail.com>
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-12 20:39:47 +08:00
Andy Green
6cd1ea9b00 update soname and configure to v1.0
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-01-10 12:45:54 +08:00
David Galeano
85a092135e Added extension "deflate-frame".
Using by default instead of "deflate-stream".
2013-01-09 18:21:33 +08:00
Alon Levy
e1be13d8b5 lib/Makefile.am: whitespace fix
Signed-off-by: Alon Levy <alevy@redhat.com>
2012-10-19 18:27:01 +08:00
Anders Brander
4e6fe90030 Add missing .h files to sources. 2012-10-17 20:10:54 +08:00
Andy Green
94c62c652c use autogen.sh
Signed-off-by: Andy Green <andy.green@linaro.org>
2012-10-06 15:17:01 +08:00
Andy Green
aa6fc44b0a mingw add win32helper to lib and fix extpoll
Based on work from Radu Sorici <soriciradu@gmail.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
2012-04-12 13:32:19 +08:00
Andy Green
39347de0e0 mingw add zlib paths
Based on work from Radu Sorici <soriciradu@gmail.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
2012-04-12 13:31:49 +08:00
Andy Green
cce2a81e85 change DATADIR to INSTALL_DATADIR solve mingw conflict
Based on work from Radu Sorici <soriciradu@gmail.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
2012-04-12 13:31:25 +08:00
Andy Green
0dbef49e54 autoconf introduce enable mingw and adapt compiler options
Based on work from Radu Sorici <soriciradu@gmail.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
2012-04-12 10:11:29 +08:00
Andy Green
a41314f3bf introduce x google mux very draft indeed
This is initial x-google-mux support.  It's disabled by default
since it's very pre-alpha.

1) To enable it, reconfigure with --enable-x-google-mux

2) It conflicts with deflate-stream, use the -u switch on
   the test client to disable deflate-stream

3) It deviates from the google standard by sending full
   headers in the addchannel subcommand rather than just
   changed ones from original connect

4) Quota is not implemented yet

5) Close of subchannel is not really implemented yet

6) Google opcode 0xf is changed to 0x7 to account for
   v7 protocol changes to opcode layout

However despite those caveats, in fact it can run the
test client reliably over one socket (both dumb-increment
and lws-mirror-protocol), you can open a browser on the
same test server too and see the circles, etc.

Signed-off-by: Andy Green <andy@warmcat.com>
2011-05-23 10:00:03 +01:00
Andy Green
7c9c4d4dca add explicit libz inclusion
Reported-by: Pierre-Paul Lavoie <ppl@idios.org>
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-07 17:52:00 +00:00
Andy Green
ce6a21dbda introduce deflate compression extension
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:32:53 +00:00
Andy Green
4cd87a0bd9 introduce internal extensions array
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:15:32 +00:00
Andy Green
b6e6ebeece uplevel-soname-and-spec-0.3.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 06:36:39 +00:00
Andy Green
90c7cbcc00 introduce-ssl-client-connections--flow-control.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 06:26:52 +00:00
Andy Green
7619c47e9c introduce-private-md5-sha1.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-23 17:47:08 +00:00
Andy Green
4739e5c450 introduce-client-support.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-22 12:51:57 +00:00
Andy Green
df73616d2c add-base64-encode-decode.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-18 15:39:02 +00:00
Andy Green
70dfebde50 use-libcrypto-hash-implementations.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-12-20 09:35:03 +00:00
Andy Green
0ca6a1719b clean-and-add-pedantic-remove-long-long.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-12-19 20:50:01 +00:00
Andy Green
b45993caf3 fork-sever-process-and-introduce-broadcast-api.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-12-18 15:13:50 +00:00
Andy Green
4f3943a8f8 move-to-automatic-protocol-list-scheme.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-12 10:44:16 +00:00
Andy Green
7c212ccf3c break-out-lib-sources.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-08 20:20:42 +00:00
Andy Green
926256e664 add-documentation-script-to-automake.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-08 17:28:21 +00:00
Andy Green
3c974691f5 convert-to-autotools.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-08 17:04:09 +00:00