Commit graph

139 commits

Author SHA1 Message Date
Andy Green
66a16f393e x google mux implement child close
This implements clean client and server close for mux child connections,
and deals with accounting for parent child lists.

The mux link can then survive constant connection bringup and teardown
found in the new test client.

Signed-off-by: Andy Green <andy@warmcat.com>
2011-05-24 22:07:45 +01: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
33872cd376 carry over 06 stuff to 07
Signed-off-by: Andy Green <andy@warmcat.com>
2011-04-24 05:49:44 +01: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
Patrick McManus
4bf91d7224 libwebsockets - gcc warnings
you have your makefiles set up to treat warnings as errors, and my gcc
4.4.5 (64 bit) compiler generates 3 warnings that need fixing:

(that sprintf() one is a real bug.. if ext_name contains formatting
characters you are looking at a potential segv).

Signed-off-by: Patrick McManus <mcmanus@ducksong.com>
2011-03-09 07:18:28 +00:00
Andy Green
da527dfdee add extra state for waiting on close ack with timeout
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-07 07:08:12 +00:00
Andy Green
6e5f95e401 allow extensions for parsing
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-06 13:15:34 +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
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
9514bf8839 carry over 05 specific stuff to 06
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-26 11:13:56 +00:00
Andy Green
687b0188bc require close reason argument on close and free session
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-26 11:04:01 +00:00
Andy Green
6274baf8c0 only send sec webscoket nonce on 04
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-26 10:31:41 +00:00
Andy Green
7942dfe282 make origin optional on server
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-26 10:28:15 +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
4b6fbe125e unify server and client close
Signed-off-by: Andy Green <andy@warmcat.com>
2011-02-14 08:03:48 +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
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
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
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
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
38e57bbd71 introduce-04-control-frames.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-19 12:20:27 +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
Andy Green
e252217633 introduce-new-04-handshake.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-18 17:14:03 +00:00
Andy Green
d1b11e3d6c introduce-new-04-headers-logic.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
4b23c72586 clean--move-v2-support-to-claim-v3.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-12-20 09:19:37 +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
f2f54d5d26 fix-md5-problem.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-15 22:08:00 +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
85ba32fcbf fix-revents-inherited-from-old-socket-bug.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-12 11:47:39 +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
018d8eb44b style-cleanups.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2010-11-08 21:04:23 +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