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

46 commits

Author SHA1 Message Date
Andy Green
788c4a8fa8 add context construction option to skip server hostname lookup
Signed-off-by: Andy Green <andy.green@linaro.org>
2012-10-22 12:29:57 +01:00
Alon Levy
0291eb3b95 libwebsocket_context: add userspace pointer for use before wsi creation
Signed-off-by: Alon Levy <alevy@redhat.com>
2012-10-19 18:27:19 +08:00
David Brooks
2c60d9584e introduce libwebsocket_client_connect_extended
Signed-off-by: David Brooks <dave@bcs.co.nz>
Signed-off-by: Andy Green <andy@warmcat.com>
--
2012-04-20 12:28:14 +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
07b56e6a8c doc LWS_EXTERN
Signed-off-by: Andy Green <andy@warmcat.com>
2011-10-03 19:30:22 +08:00
Andy Green
46c2ea0d6f pass ext pointer in ext callback
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-22 09:04:01 +00:00
Andy Green
e9739ed203 introduce fraggle test app
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-07 21:40:59 +00:00
Andy Green
2366b1c997 instantiate extensions server accepted
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:15:31 +00:00
Andy Green
c6517fa2ad dynamically create client extensions offer from extensions list
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:15:29 +00:00
Andy Green
57b4e9af2b document extension callback reasons
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:14:46 +00:00
Andy Green
98a717c7ed callback each active extension on packet rx pre parse
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:14:15 +00:00
Andy Green
c511482c78 create server extension response dynamically
This goes through the extentsions the client requested, selects the ones
that we support at the server, and then further calls back to the appropriate
protocol callback in user code to check it's OK to actually use that
extension in this context.  If it is (callback unhandled == it is) then
it's added to the list of extensions sent back to the client.

Accepted extensions are also added to the connection's active extension
list and the private "user" memory allocation for the extension context is
done and bound to the connection.

Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 10:29:35 +00:00
Andy Green
d6e09110bb introduce struct libwebsocket_extension
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-05 16:12:15 +00:00
Peter Hinz
56885f3084 introduce win32 build capability
This adds win32 build compatability to libwebsockets.

The patch is from Peter Hinz, Andy Green has cleaned it up a bit and
possibly broken win32 compatability since I can't test it, so there
may be followup patches.  It compiles fine under Linux after this
patch anyway.

Much of the patch is changing a reserved keyword for Visual C compiler
"this" to "context", but there is no real C99 support in the MSFT
compiler even though it is 2011 so C99 style array declarations
have been mangled back into "ancient C" style.

Some windows-isms are also added like closesocket() but these are
quite localized.  Win32 random is just using C library random() call
at the moment vs Linux /dev/urandom.  canonical hostname detection is
broken in win32 at the moment.

Signed-off-by: Peter Hinz <cerebusrc@gmail.com>
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-02 22:03:47 +00:00
Andy Green
385e7ad034 introduce LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER
This adds a callback to protocols[0] which happens when the
Client HTTP handshake packet is being composed.  After all the
headers for the websocket handshake to the server have been
added, the callback is called with a pointer to a char *
that allows extra headers to be added.  See the comments in
libwebsocket.h or the api documentation for example code.

Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-01 21:06:02 +00:00
Andy Green
6901cb3b4e add callback for OpenSSL client cert verification action
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-21 08:06:47 +00:00
Andy Green
0894bda184 add callback to allow additional client verification certs
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-19 09:09:11 +00:00
Andy Green
32375b7e9e introduce listen on specific interface
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-19 08:32:53 +00:00
Andy Green
be93fefa76 break client connect into states and apply timeout
Doing a client connect was atomic until now, blocking
all the other service while it waited for proxy and / or
server response.

This patch uses the new timeout system and breaks the
client connect sequence into three states handled by
the normal poll() processing.  It means that there are
now no blocking network delays and it's all handled
by the main state machine.

Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 20:25:43 +00:00
Darin Willits
c19456f64a Apple / iOS build compatability patch
This allows build on iOS platform, thanks Darin!

Signed-off-by: Darin Willits <darin@willits.ca>
2011-02-14 17:52:39 +00:00
Andy Green
62c54d2f56 introduce this param in callback fix server close on client socket
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 09:14:25 +00:00
Andy Green
f7ee549a58 introduce-libwebsockets_hangup_on_client.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-13 09:04:21 +00:00
Andy Green
0703409235 introduce-network-connect-filter-callback.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-13 08:37:12 +00:00
Andy Green
c85619dbcd introduce-user-handshake-filter-callback.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-13 08:25:26 +00:00
Andy Green
3221f92b1e introduce-external-poll-callbacks.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-12 13:14:11 +00:00
Andy Green
9f99034f7e export-libwebsocket_service_fd-api.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-12 11:57:45 +00:00
Andy Green
0d33833764 decouple-service-from-fd-array-index.patch
This patch removes the relationship between position in the
pollfd[] array and any meaning about the type of socket.

It also refactors the service loop so there is a per-fd
function that detects the mode of the connection and services
it accordingly.

The context wsi * array is removed and a hashtable introduced
allowing fast wsi lookup from just the fd that it is
associated with

Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-12 11:57:43 +00:00
Andy Green
bfb051f3a3 introduce-ietf-05-framing-and-commandline-options.patch
This adds 05 support, and -v switches on test-client and test-ping
to allow setting their ietf protocol version to 4 or 5.

It also optimizes the masking to us a function pointer, which
takes some conditionals out of the fast path.

Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-09 08:49:14 +00:00
Andy Green
8014b29d20 introduce-k-switch-defeat-masking.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-30 20:57:25 +00:00
Andy Green
2ac5a6fce4 fix-host-header-contents--introduce-canonical-hostname-api.patch
I?aki pointed out the dummy host field used in client test and ping
is not valid http.  This patch changes it to use the actual host
name and adds an api to collect that from the context cheaply.

Reported-by: I?aki Baz Castillo <ibc@aliax.net>
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-28 10:00:18 +00:00
Andy Green
a6cbece1ac introduce-test-ping-app.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 20:06:03 +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
6964bb5ee5 clean--fix-sigpipe.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-23 16:50:33 +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
e92cd1764e expose-event-loop.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-19 13:11:55 +00:00
Andy Green
38e57bbd71 introduce-04-control-frames.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-19 12:20:27 +00:00
Andy Green
8f037e4c9a clean-whitespace.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-12-19 22:13:26 +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
e77ddd828d coding-style-cleanups.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-13 10:03:47 +00:00
Andy Green
47943ae82d fix-user-pointer-bug.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-12 11:15:49 +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
ce510c6beb add-Sec-WebSocket-Draft-and-protocol-autodetect.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-11 12:48:13 +00:00
Andy Green
a2b0ab0e30 add-protocol-filter.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-11 12:28:29 +00:00
Andy Green
3faa9c716c add-wss-ssl-openssl-support.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-08 17:03:03 +00:00
Andy Green
62a1293193 change-api-docs-to-html.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-03 11:19:23 +00:00