Commit graph

1631 commits

Author SHA1 Message Date
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
1f9bf527ec fix ssl support and confirm builds clean when not configured
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 21:14:37 +00:00
Andy Green
038d582bde add include for gettimeofday even without ssl
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 20:58:26 +00:00
Darin Willits
db9ba42aad Only include anything from openssl if configured for it
Signed-off-by: Darin Willits <darin@willits.ca>
2011-02-14 20:56:24 +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
Andy Green
a71eafce5a 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>
2011-02-14 17:59:43 +00:00
Timothy J Fontaine
b86d64eaa9 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>
2011-02-14 17:55:27 +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
abbf461998 eliminate dummy 76 challenge content in 04 plus
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 09:14:24 +00:00
Andy Green
4b6fbe125e unify server and client close
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 08:03:48 +00:00
Andy Green
de6ab32861 clean-out-poll-array-when-hanging-up-on-client.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-13 09:15:10 +00:00
Andy Green
e2acfc86b3 use-new-peer-name-api-in-ping.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-13 09:05:54 +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
e7981dc65a document-external-poll-support.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-12 21:24:03 +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
44eee688ac optimize-random-device-open.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-10 09:32:24 +00:00
Andy Green
92970baa90 optimize-server-for-all-zero-nonce-case.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-10 09:22:35 +00:00
Andy Green
5e1fa17a6c introduce-new-05-socket-closure-rules.patch
Signed-off-by: Andy Green <andy.green@linaro.org>
2011-02-10 09:07:05 +00:00
Andy Green
18910c5920 parse-and-reject-extensions-header.patch
Signed-off-by: Andy Green <andy@linaro.org>
2011-02-09 08:58:42 +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
f3d3b40364 change-client-mode-to-enum.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-09 07:16:34 +00:00
Andy Green
1efb63c2be fix-hostname-to-be-server-name--allow-switches-in-any-order.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-06 17:42:06 +00:00
Andy Green
927eb7b90d fix-error-path-on-server-headers-wrong.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-01 08:52:55 +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
6a98054a36 fix-context-close.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-30 20:40:32 +00:00
Andy Green
d655cb4f82 fix-client-close.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-30 12:15:22 +00:00
Andy Green
864d9026a8 add-user-allocation-for-client-connects.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-30 11:43:51 +00:00
Andy Green
bd96d8092e introduce-LWS_WRITE_CLIENT_IGNORE_XOR_MASK.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-30 08:24:31 +00:00
Andy Green
42f6914d69 clean-style.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-30 08:10:02 +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
5b9a4c0d43 cleanup-proxy-code--add-timeout.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-28 09:39:29 +00:00
Andy Green
02244bb889 correct-proxy-fail-connect-handling.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-28 09:01:19 +00:00
Andy Green
9659f37967 introduce-http_proxy-support-no-auth.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 22:01:43 +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
f55830dba5 workaround-32bit-size_t.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 06:45:53 +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
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
ed11a02201 add-enable-nofork-config-option.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-20 10:23:50 +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
3e5eb78490 introduce-new-04-frame-unmasking.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-18 18:14:26 +00:00
Andy Green
f85e830f7b introduce-new-04-masking-key-computation.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-18 17:45:00 +00:00