Andy Green [Sat, 5 Mar 2011 16:12:15 +0000 (16:12 +0000)]
introduce struct libwebsocket_extension
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 5 Mar 2011 16:12:04 +0000 (16:12 +0000)]
fix openssl breakage from win32
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 5 Mar 2011 09:04:23 +0000 (09:04 +0000)]
win32 build fixup missing includes
Signed-off-by: Andy Green <andy@warmcat.com>
Peter Hinz [Wed, 2 Mar 2011 22:03:47 +0000 (22:03 +0000)]
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>
Andy Green [Tue, 1 Mar 2011 21:06:02 +0000 (21:06 +0000)]
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>
Andy Green [Tue, 1 Mar 2011 20:44:24 +0000 (20:44 +0000)]
introduce 76 00 client support
This adds 76/00 client support to libwebsockets. It's still shipped
by browsers and more importantly still the only version supported by
server stuff like socket.io.
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 28 Feb 2011 07:48:27 +0000 (07:48 +0000)]
update README with known good OSX configure
Christopher Baker sent in a working OSX configure string,
add it to the README
Reported-by: Christopher Baker <me@christopherbaker.net>
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 28 Feb 2011 07:45:29 +0000 (07:45 +0000)]
fix null protocol dereference when closing session
Thanks to Christopher Baker for pointing out that when we close a session,
if the close is coming before a protocol was negotiated for the connection
or when the protocol was otherwise left at NULL, we'll blow a segfault.
This implements his proposed fix.
Reported-by: Christopher Baker <me@christopherbaker.net>
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 11:17:48 +0000 (11:17 +0000)]
only have nonce requirement and processing for exactly 04
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 11:13:56 +0000 (11:13 +0000)]
carry over 05 specific stuff to 06
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 11:08:46 +0000 (11:08 +0000)]
change default client version to 06
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 11:06:27 +0000 (11:06 +0000)]
remove duplicated poll handling in hangup on client
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 11:04:01 +0000 (11:04 +0000)]
require close reason argument on close and free session
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 10:40:02 +0000 (10:40 +0000)]
introduce 06 close status codes
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 10:31:41 +0000 (10:31 +0000)]
only send sec webscoket nonce on 04
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 10:28:15 +0000 (10:28 +0000)]
make origin optional on server
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 26 Feb 2011 10:22:49 +0000 (10:22 +0000)]
make origin optional on client
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 21 Feb 2011 08:06:47 +0000 (08:06 +0000)]
add callback for OpenSSL client cert verification action
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 20 Feb 2011 11:10:47 +0000 (11:10 +0000)]
add callback to allow additional server verification certs
This adds a LWS_CALLBACK_OPENSSL_LOAD_EXTRA_SERVER_VERIFY_CERTS callback
which offers a chance for the server context to be loaded with additional
certtificates allowing it to verify incoming client certs. The callback
always comes to protocol[0].
It also introduces the context option LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT
which will enforce client cert checking on any ssl connection.
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 19 Feb 2011 09:09:11 +0000 (09:09 +0000)]
add callback to allow additional client verification certs
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 19 Feb 2011 08:32:53 +0000 (08:32 +0000)]
introduce listen on specific interface
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Wed, 16 Feb 2011 18:50:01 +0000 (18:50 +0000)]
README update configure advice for apple
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 14 Feb 2011 21:14:37 +0000 (21:14 +0000)]
fix ssl support and confirm builds clean when not configured
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 14 Feb 2011 20:58:26 +0000 (20:58 +0000)]
add include for gettimeofday even without ssl
Signed-off-by: Andy Green <andy@warmcat.com>
Darin Willits [Mon, 14 Feb 2011 20:56:24 +0000 (20:56 +0000)]
Only include anything from openssl if configured for it
Signed-off-by: Darin Willits <darin@willits.ca>
Andy Green [Mon, 14 Feb 2011 20:25:43 +0000 (20:25 +0000)]
make test client notice if server closed on him
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 14 Feb 2011 20:25:43 +0000 (20:25 +0000)]
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>
Andy Green [Mon, 14 Feb 2011 17:59:43 +0000 (17:59 +0000)]
introduce timeout system
This adds a concept of timeouts for operations enforced by
connection closure if the timeout is reached.
Once a second all sockets are checked for timing out, every time
there is a service call it checks to see if a second has passed since
the last check and checks if so.
You can also call libwebsocket_service_fd() with a NULL fd to give
the timeouts a chance to be detected; if it's less than a second since
the last check it returns immediately.
Signed-off-by: Andy Green <andy@warmcat.com>
Timothy J Fontaine [Mon, 14 Feb 2011 17:55:27 +0000 (17:55 +0000)]
Fix refactor damage from missed debug-only print arg
Just a quick follow up there is a compile error at the moment, which I
think is resolved as the following?
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Darin Willits [Mon, 14 Feb 2011 17:52:39 +0000 (17:52 +0000)]
Apple / iOS build compatability patch
This allows build on iOS platform, thanks Darin!
Signed-off-by: Darin Willits <darin@willits.ca>
Andy Green [Mon, 14 Feb 2011 09:14:25 +0000 (09:14 +0000)]
introduce this param in callback fix server close on client socket
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 14 Feb 2011 09:14:24 +0000 (09:14 +0000)]
eliminate dummy 76 challenge content in 04 plus
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 14 Feb 2011 08:03:48 +0000 (08:03 +0000)]
unify server and client close
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 13 Feb 2011 09:15:10 +0000 (09:15 +0000)]
clean-out-poll-array-when-hanging-up-on-client.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 09:08:11 +0000 (09:08 +0000)]
uplevel-rpm-spec-to-include-new-extpoll-sample.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 09:05:54 +0000 (09:05 +0000)]
use-new-peer-name-api-in-ping.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 09:04:21 +0000 (09:04 +0000)]
introduce-libwebsockets_hangup_on_client.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 08:54:05 +0000 (08:54 +0000)]
add-example-protocol-handshake-filter-callback.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 08:40:37 +0000 (08:40 +0000)]
add-example-network-filter-callback.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 08:37:12 +0000 (08:37 +0000)]
introduce-network-connect-filter-callback.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 13 Feb 2011 08:25:26 +0000 (08:25 +0000)]
introduce-user-handshake-filter-callback.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 12 Feb 2011 21:24:03 +0000 (21:24 +0000)]
document-external-poll-support.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 12 Feb 2011 13:15:04 +0000 (13:15 +0000)]
add-ext-poll-callbacks-in-extpoll-test.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 12 Feb 2011 13:14:11 +0000 (13:14 +0000)]
introduce-external-poll-callbacks.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 12 Feb 2011 12:07:23 +0000 (12:07 +0000)]
introduce-libwebsockets-test-server-extpoll.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 12 Feb 2011 11:57:45 +0000 (11:57 +0000)]
export-libwebsocket_service_fd-api.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 12 Feb 2011 11:57:43 +0000 (11:57 +0000)]
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>
Andy Green [Thu, 10 Feb 2011 09:32:24 +0000 (09:32 +0000)]
optimize-random-device-open.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 10 Feb 2011 09:22:35 +0000 (09:22 +0000)]
optimize-server-for-all-zero-nonce-case.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 10 Feb 2011 09:07:05 +0000 (09:07 +0000)]
introduce-new-05-socket-closure-rules.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 9 Feb 2011 08:58:42 +0000 (08:58 +0000)]
parse-and-reject-extensions-header.patch
Signed-off-by: Andy Green <andy@linaro.org>
Andy Green [Wed, 9 Feb 2011 08:49:14 +0000 (08:49 +0000)]
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>
Andy Green [Wed, 9 Feb 2011 07:16:34 +0000 (07:16 +0000)]
change-client-mode-to-enum.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 6 Feb 2011 17:42:06 +0000 (17:42 +0000)]
fix-hostname-to-be-server-name--allow-switches-in-any-order.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 1 Feb 2011 08:52:55 +0000 (08:52 +0000)]
fix-error-path-on-server-headers-wrong.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 21:04:24 +0000 (21:04 +0000)]
add-k-opt-to-test-client.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 20:57:25 +0000 (20:57 +0000)]
introduce-k-switch-defeat-masking.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 20:40:32 +0000 (20:40 +0000)]
fix-context-close.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 12:15:25 +0000 (12:15 +0000)]
introduce-multiple-client-ping.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 12:15:22 +0000 (12:15 +0000)]
fix-client-close.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 11:43:51 +0000 (11:43 +0000)]
add-user-allocation-for-client-connects.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 08:24:31 +0000 (08:24 +0000)]
introduce-LWS_WRITE_CLIENT_IGNORE_XOR_MASK.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 30 Jan 2011 08:10:02 +0000 (08:10 +0000)]
clean-style.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 28 Jan 2011 10:00:18 +0000 (10:00 +0000)]
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>
Andy Green [Fri, 28 Jan 2011 09:39:29 +0000 (09:39 +0000)]
cleanup-proxy-code--add-timeout.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 28 Jan 2011 09:01:19 +0000 (09:01 +0000)]
correct-proxy-fail-connect-handling.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 27 Jan 2011 22:01:43 +0000 (22:01 +0000)]
introduce-http_proxy-support-no-auth.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 27 Jan 2011 20:06:03 +0000 (20:06 +0000)]
introduce-test-ping-app.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 27 Jan 2011 06:53:39 +0000 (06:53 +0000)]
add-test-client-rpm-spec.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 27 Jan 2011 06:45:53 +0000 (06:45 +0000)]
workaround-32bit-size_t.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 27 Jan 2011 06:36:39 +0000 (06:36 +0000)]
uplevel-soname-and-spec-0.3.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 27 Jan 2011 06:26:52 +0000 (06:26 +0000)]
introduce-ssl-client-connections--flow-control.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 23 Jan 2011 17:53:54 +0000 (17:53 +0000)]
document-new-config-options.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 23 Jan 2011 17:47:08 +0000 (17:47 +0000)]
introduce-private-md5-sha1.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 23 Jan 2011 16:50:33 +0000 (16:50 +0000)]
clean--fix-sigpipe.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 22 Jan 2011 12:51:57 +0000 (12:51 +0000)]
introduce-client-support.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Thu, 20 Jan 2011 10:23:50 +0000 (10:23 +0000)]
add-enable-nofork-config-option.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Wed, 19 Jan 2011 13:11:55 +0000 (13:11 +0000)]
expose-event-loop.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Wed, 19 Jan 2011 12:20:27 +0000 (12:20 +0000)]
introduce-04-control-frames.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 18 Jan 2011 18:14:26 +0000 (18:14 +0000)]
introduce-new-04-frame-unmasking.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 18 Jan 2011 17:45:00 +0000 (17:45 +0000)]
introduce-new-04-masking-key-computation.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 18 Jan 2011 17:14:03 +0000 (17:14 +0000)]
introduce-new-04-handshake.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 18 Jan 2011 15:39:02 +0000 (15:39 +0000)]
introduce-new-04-headers-logic.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 18 Jan 2011 15:39:02 +0000 (15:39 +0000)]
add-base64-encode-decode.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 18 Jan 2011 15:29:04 +0000 (15:29 +0000)]
use-enum-for-demo-protocols.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 20 Dec 2010 09:35:03 +0000 (09:35 +0000)]
use-libcrypto-hash-implementations.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 20 Dec 2010 09:19:37 +0000 (09:19 +0000)]
clean--move-v2-support-to-claim-v3.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 19 Dec 2010 22:25:16 +0000 (22:25 +0000)]
uplevel-rpm-soname.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 19 Dec 2010 22:13:26 +0000 (22:13 +0000)]
clean-whitespace.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sun, 19 Dec 2010 20:50:01 +0000 (20:50 +0000)]
clean-and-add-pedantic-remove-long-long.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 18 Dec 2010 15:13:50 +0000 (15:13 +0000)]
fork-sever-process-and-introduce-broadcast-api.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 15 Nov 2010 22:08:00 +0000 (22:08 +0000)]
fix-md5-problem.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 15 Nov 2010 19:39:30 +0000 (19:39 +0000)]
fix-script-to-synthesize-websocket-url-entirely-from-script-url.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 15 Nov 2010 17:03:26 +0000 (17:03 +0000)]
add-rpm-spec-file.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 15 Nov 2010 15:36:59 +0000 (15:36 +0000)]
md5-move-to-using-standard-accessor-macros-for-le.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 15 Nov 2010 12:46:25 +0000 (12:46 +0000)]
remove-md5-struct.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Sat, 13 Nov 2010 10:03:47 +0000 (10:03 +0000)]
coding-style-cleanups.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 12 Nov 2010 14:12:13 +0000 (14:12 +0000)]
mirror-protocol-chrome-and-firefox.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 12 Nov 2010 13:11:50 +0000 (13:11 +0000)]
add-INSTALL.patch
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 12 Nov 2010 13:10:40 +0000 (13:10 +0000)]
introduce-mirror-test-protocol.patch
Signed-off-by: Andy Green <andy@warmcat.com>