platform/upstream/libwebsockets.git
9 years agoclean http2 passphrase code
Andy Green [Wed, 5 Nov 2014 07:32:58 +0000 (15:32 +0800)]
clean http2 passphrase code

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 window update
Andy Green [Wed, 29 Oct 2014 01:39:08 +0000 (09:39 +0800)]
http2 window update

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoclean remove debug spew outside http2
Andy Green [Sat, 1 Nov 2014 00:41:02 +0000 (08:41 +0800)]
clean remove debug spew outside http2

Found by Drew Noakes at
https://github.com/warmcat/libwebsockets/issues/190

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoSubject: [PATCH] ssl fix self-singed certificate acceptation
kulwik [Thu, 30 Oct 2014 18:26:14 +0000 (18:26 +0000)]
Subject: [PATCH] ssl fix self-singed certificate acceptation

9 years agoSubject: [PATCH] fixes for handling multiple protocols in handshake
Rene Jager [Tue, 28 Oct 2014 22:27:20 +0000 (23:27 +0100)]
Subject: [PATCH] fixes for handling multiple protocols in handshake

9 years agohttp2 padding and ping to autopong
Andy Green [Mon, 27 Oct 2014 08:46:44 +0000 (16:46 +0800)]
http2 padding and ping to autopong

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoopenssl update deprecated remove_state api
Andy Green [Mon, 27 Oct 2014 03:38:03 +0000 (11:38 +0800)]
openssl update deprecated remove_state api

As suggested by svetlin-mladenov here

https://github.com/warmcat/libwebsockets/issues/186

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoSubject: [PATCH] Fix minor typos in code documentation
Drew Noakes [Thu, 23 Oct 2014 14:34:26 +0000 (15:34 +0100)]
Subject: [PATCH] Fix minor typos in code documentation

9 years agohttp2 alpn npn pollout
Andy Green [Wed, 22 Oct 2014 07:37:28 +0000 (15:37 +0800)]
http2 alpn npn pollout

This adds npn / alpn support if your openssl can handle it.
Then, browsers that understand alpn will by default
negotiate http/1.1 and work as normal.

Clients that understand http2.0 can negotiate h2-14 and
use the basic but working http2.0 support automatically

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoSubject: [PATCH] Initialize openssl during client initialization.
Marek Kochanowicz [Mon, 13 Oct 2014 05:32:32 +0000 (07:32 +0200)]
Subject: [PATCH] Initialize openssl during client initialization.

9 years agohttp2 dont use incoming END_STREAM when sending headers
Andy Green [Sat, 18 Oct 2014 23:36:20 +0000 (07:36 +0800)]
http2 dont use incoming END_STREAM when sending headers

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoadd newline on libwebsockets.c for ancient compilers
Andy Green [Sat, 18 Oct 2014 10:52:39 +0000 (18:52 +0800)]
add newline on libwebsockets.c for ancient compilers

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 working nghttp fetch multi files completely
Andy Green [Sat, 18 Oct 2014 10:54:04 +0000 (18:54 +0800)]
http2 working nghttp fetch multi files completely

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 track content length add END_STREAM
Andy Green [Sat, 18 Oct 2014 04:23:05 +0000 (12:23 +0800)]
http2 track content length add END_STREAM

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 handle flags
Andy Green [Fri, 17 Oct 2014 00:38:44 +0000 (08:38 +0800)]
http2 handle flags

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl clean recent external CTX patch so doesnt break build
Andy Green [Fri, 17 Oct 2014 00:47:51 +0000 (08:47 +0800)]
ssl clean recent external CTX patch so doesnt break build

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl allow externally managed SSL_CTX
joseph.urciuoli [Thu, 16 Oct 2014 00:53:19 +0000 (08:53 +0800)]
ssl allow externally managed SSL_CTX

Signed-off-by: joseph.urciuoli <trac90@UNKNOWN.org>
9 years agotrac 89 add flag on fatal send fail to use simple close
Andy Green [Thu, 16 Oct 2014 00:23:46 +0000 (08:23 +0800)]
trac 89 add flag on fatal send fail to use simple close

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 able to send test.html to nghttp2
Andy Green [Sun, 12 Oct 2014 06:31:47 +0000 (14:31 +0800)]
http2 able to send test.html to nghttp2

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 hpack basic decode ok including huff
Andy Green [Sun, 12 Oct 2014 00:38:16 +0000 (08:38 +0800)]
http2 hpack basic decode ok including huff

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 add hpack decode support
Andy Green [Thu, 9 Oct 2014 08:57:47 +0000 (16:57 +0800)]
http2 add hpack decode support

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agofix return_http_status adaptation for http2
Andy Green [Thu, 9 Oct 2014 22:13:40 +0000 (06:13 +0800)]
fix return_http_status adaptation for http2

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl renew timeout while post keeps coming
Christian Schüldt [Thu, 9 Oct 2014 08:58:24 +0000 (16:58 +0800)]
ssl renew timeout while post keeps coming

Signed-off-by: Christian Schüldt <crilla@kth.se>
9 years agossl fix service problem in MORE_SERVICE case
Christian Schüldt [Thu, 9 Oct 2014 00:37:12 +0000 (08:37 +0800)]
ssl fix service problem in MORE_SERVICE case

Signed-off-by: Christian Schüldt <crilla@kth.se>
9 years agossl optimize poll when buffered ssl read data
Andy Green [Thu, 9 Oct 2014 00:29:22 +0000 (08:29 +0800)]
ssl optimize poll when buffered ssl read data

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl_capable_read add context param
Andy Green [Thu, 9 Oct 2014 00:14:30 +0000 (08:14 +0800)]
ssl_capable_read add context param

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl fix pending reads stuck in ssl layer
Andy Green [Wed, 8 Oct 2014 03:29:49 +0000 (11:29 +0800)]
ssl fix pending reads stuck in ssl layer

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 fix build when http2 disabled
Andy Green [Wed, 8 Oct 2014 04:15:15 +0000 (12:15 +0800)]
http2 fix build when http2 disabled

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 headers huffman decoder
Andy Green [Mon, 6 Oct 2014 08:47:20 +0000 (16:47 +0800)]
http2 headers huffman decoder

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 can keep upgraded connection up
Andy Green [Wed, 8 Oct 2014 04:00:53 +0000 (12:00 +0800)]
http2 can keep upgraded connection up

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agobase64 add back decoder now we need it.patc
Andy Green [Tue, 30 Sep 2014 08:35:16 +0000 (16:35 +0800)]
base64 add back decoder now we need it.patc

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoparser default to name parsing if unknown
Andy Green [Tue, 30 Sep 2014 08:33:56 +0000 (16:33 +0800)]
parser default to name parsing if unknown

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp2 add h2c upgrade and http2 connmode
Andy Green [Tue, 30 Sep 2014 01:43:14 +0000 (09:43 +0800)]
http2 add h2c upgrade and http2 connmode

Connection upgrade handling for h2c
Establish http2 union struct and http2 connmode
No protocol code yet

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoadd http2 settings token
Andy Green [Sun, 23 Feb 2014 06:38:59 +0000 (14:38 +0800)]
add http2 settings token

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agotest server correct header naming order
Andy Green [Tue, 30 Sep 2014 00:23:06 +0000 (08:23 +0800)]
test server correct header naming order

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoconfirm upgrade actually for websocket
Andy Green [Tue, 30 Sep 2014 00:15:49 +0000 (08:15 +0800)]
confirm upgrade actually for websocket

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agointernal SHA1 users all use libwebsockets_SHA1
Andy Green [Thu, 25 Sep 2014 21:56:23 +0000 (05:56 +0800)]
internal SHA1 users all use libwebsockets_SHA1

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoandroid fix syslog path
Dnyanesh Gate [Thu, 25 Sep 2014 21:39:05 +0000 (05:39 +0800)]
android fix syslog path

9 years agoPass user_sapce to callback for LWS_CALLBACK_CLIENT_CONNECTION_ERROR
Duncan Tebbs [Thu, 25 Sep 2014 01:39:13 +0000 (10:39 +0900)]
Pass user_sapce to callback for LWS_CALLBACK_CLIENT_CONNECTION_ERROR

9 years agofix required CMake version
Hiroaki Sakon [Mon, 22 Sep 2014 13:39:59 +0000 (22:39 +0900)]
fix required CMake version

AG also updated the machine-readable min cmake version

9 years agofix byte order for qnx
emironov [Tue, 16 Sep 2014 10:05:13 +0000 (14:05 +0400)]
fix byte order for qnx

9 years agoalso callback closed if flushing
Stefan Schuermans [Mon, 8 Sep 2014 06:01:58 +0000 (14:01 +0800)]
also callback closed if flushing

9 years agofix build for NO_SERVER
Andy Green [Wed, 27 Aug 2014 08:31:20 +0000 (16:31 +0800)]
fix build for NO_SERVER

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agodefer PONG send until no partial send buffer
Andy Green [Sun, 24 Aug 2014 06:39:19 +0000 (14:39 +0800)]
defer PONG send until no partial send buffer

Reported-by: Andrew Canaday
Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoserver.c: test **truncated_send_len** for partial
Andrew Canaday [Sun, 24 Aug 2014 01:45:12 +0000 (21:45 -0400)]
server.c: test **truncated_send_len** for partial

Testing against truncated_send_malloc won't work if we've already
buffered and completed a partial buffer, as truncated_send_malloc
isn't free'd until the socket is destroyed.

9 years agoaccept fail char means we are done
Andy Green [Fri, 22 Aug 2014 11:38:17 +0000 (19:38 +0800)]
accept fail char means we are done

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agofix bad cmake args example in README.build
Andy Green [Tue, 19 Aug 2014 11:21:32 +0000 (19:21 +0800)]
fix bad cmake args example in README.build

As told here
https://github.com/warmcat/libwebsockets/issues/166

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agocleanup style in parser
Andy Green [Tue, 19 Aug 2014 10:34:31 +0000 (18:34 +0800)]
cleanup style in parser

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agofix build without ssl support
Andy Green [Tue, 19 Aug 2014 00:41:26 +0000 (08:41 +0800)]
fix build without ssl support

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agosoname 5.0.0
Andy Green [Mon, 18 Aug 2014 15:21:28 +0000 (23:21 +0800)]
soname 5.0.0

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agointroduce lws_partial_buffered
Andy Green [Mon, 18 Aug 2014 14:49:39 +0000 (22:49 +0800)]
introduce lws_partial_buffered

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agodeprecate no_buffer_all_partials
Andy Green [Mon, 18 Aug 2014 14:21:51 +0000 (22:21 +0800)]
deprecate no_buffer_all_partials

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agohttp keepalive needs to reinit some header union state
Carl Stehle [Sat, 16 Aug 2014 02:17:59 +0000 (10:17 +0800)]
http keepalive needs to reinit some header union state

AG moved the code to the keepalive loop location

9 years agoadd lws_is_ssl api
Andy Green [Sat, 16 Aug 2014 01:54:27 +0000 (09:54 +0800)]
add lws_is_ssl api

Suggested by Michael Harbler on the mailing list

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agocyassl: correct include path for 3.1.x
Karl Palsson [Thu, 14 Aug 2014 16:30:48 +0000 (16:30 +0000)]
cyassl: correct include path for 3.1.x

9 years agoapi: add feature test macro LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
Michael Haberler [Mon, 11 Aug 2014 12:36:57 +0000 (14:36 +0200)]
api: add feature test macro  LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD

9 years agoprotocol struct add user controlled id member
Andy Green [Mon, 11 Aug 2014 04:11:36 +0000 (12:11 +0800)]
protocol struct add user controlled id member

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agofix spinning on NULL protocol name
Andy Green [Mon, 11 Aug 2014 01:11:57 +0000 (09:11 +0800)]
fix spinning on NULL protocol name

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl fix excessive crash workaround
Andy Green [Sun, 10 Aug 2014 01:50:42 +0000 (09:50 +0800)]
ssl fix excessive crash workaround

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agono protocol usage inprove docs
Andy Green [Thu, 7 Aug 2014 08:52:15 +0000 (16:52 +0800)]
no protocol usage inprove docs

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoReset hdr_parsing_completed for WSI_STATE_HTTP:
Andrew Canaday [Wed, 6 Aug 2014 12:58:23 +0000 (08:58 -0400)]
Reset hdr_parsing_completed for WSI_STATE_HTTP:

This fixes a bug where a client issues two GET requests on the same connection
(keep-alive). If the second request is split into two reads, the
hdr_parsing_complete flag gets us into trouble by ending the request read two
early and giving us bogus data.

9 years agotrac82 consistently use CONTEXT_PORT_NO_LISTEN
Andy Green [Thu, 31 Jul 2014 01:44:00 +0000 (09:44 +0800)]
trac82 consistently use CONTEXT_PORT_NO_LISTEN

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agossl allow passing cert passphrase
Oleh [Tue, 29 Jul 2014 15:18:41 +0000 (23:18 +0800)]
ssl allow passing cert passphrase

https://github.com/warmcat/libwebsockets/issues/152

9 years agoavoid crash if we dont have new wsi
Andy Green [Tue, 29 Jul 2014 15:02:07 +0000 (23:02 +0800)]
avoid crash if we dont have new wsi

Signed-off-by: Andy Green <andy.green@linaro.org>
9 years agoFix TCP keepalive use in UNIX systems
Aurelian Pop [Tue, 29 Jul 2014 12:36:06 +0000 (15:36 +0300)]
Fix TCP keepalive use in UNIX systems

10 years agoKeep-alive: disable timeout and let TCP ka kill.
Andrew Canaday [Fri, 18 Jul 2014 23:01:10 +0000 (07:01 +0800)]
Keep-alive: disable timeout and let TCP ka kill.

This is required for streaming HTTP connections.
Not sure if there's a more graceful way to handle this
(maybe resetting the timeout in the 'send'-side code?

10 years agoMake sure headers are parsed before proceeding.
Andrew Canaday [Fri, 18 Jul 2014 23:00:52 +0000 (07:00 +0800)]
Make sure headers are parsed before proceeding.

10 years agoOnly check for '?' URI args during URI path parse
Andrew Canaday [Fri, 18 Jul 2014 22:58:53 +0000 (06:58 +0800)]
Only check for '?' URI args during URI path parse

10 years agohandle client protocol lists properly
Andy Green [Fri, 18 Jul 2014 22:52:39 +0000 (06:52 +0800)]
handle client protocol lists properly

We fail to deal with lists of protocols sent by the client
by picking one from the list properly.  This fixes that and
adds protocol lists to the test client for regression testing.

Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agoDon't need 'content_remain' in libwebsocket_read
Andrew Canaday [Mon, 14 Jul 2014 12:19:50 +0000 (20:19 +0800)]
Don't need 'content_remain' in libwebsocket_read

10 years agoHTTP Version, Keep-alive support, No-copy POST
Andrew Canaday [Sun, 13 Jul 2014 05:07:36 +0000 (01:07 -0400)]
HTTP Version, Keep-alive support, No-copy POST

This is a squashed commit from https://github.com/andrew-canaday/libwebsockets,
dev/http_keepalive branch (strategies changed a few times, so the commit
history is clutteread). This branch is submitted for clarity, but the other
can be used as a reference or alternative.

 * added **enum http_version** to track HTTP/1.0 vs HTTP/1.1 requests
 * added **enum http_connection_type** to track keep-alive vs close
 * replaced content_length_seen and body_index with **content_remain**
 * removed **post_buffer** (see handshake.c modifications)

 * removed post_buffer free

 * switch state to WSI_TOKEN_SKIPPING after URI is complete to store version
 * delete *spill* label (unused)

 * add vars to track HTTP version and connection type
 * HTTP version defaults to 1.0
 * connection type defaults to 'close' for 1.0, keep-alive for 1.1
 * additional checks in **cleanup:** label:
   * if HTTP version string is present and valid, set enum val appropriately
   * override connection default with the "Connection:" header, if present
 * set state to WSI_STATE_HTTP_BODY if content_length > 0
 * return 0 on HTTP requests, unless LWS_CALLBACK_HTTP indicates otherwise

 * add vars to track remaining content_length and body chunk size
 * re-arrange switch case order to facilitate creation of jump-table
 * added new labels:
   * **read_ok**: normal location reach on break from switch; just return 0
   * **http_complete**: check for keep-alive + init state, mode, hdr table
   * **http_new**: jump location for keep-alive when http_complete sees len>0
 * after libwebsocket_parse, jump to one of those labels based on state
 * POST body handling:
   * don't bother iterating over input byte-by-byte or using memcpy
   * just pass the relevant portion of the context->service_buffer to callback

10 years agolibwebsockets_read: update 'len' after lws_handshake_server invocation
Andrew Canaday [Mon, 7 Jul 2014 22:10:02 +0000 (18:10 -0400)]
libwebsockets_read: update 'len' after lws_handshake_server invocation

10 years agoupdate changelog for 1.3
Andy Green [Sun, 6 Jul 2014 01:56:11 +0000 (09:56 +0800)]
update changelog for 1.3

Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agotest server dumb increment fix once per second duplicate
Andy Green [Sat, 5 Jul 2014 03:52:58 +0000 (11:52 +0800)]
test server dumb increment fix once per second duplicate

Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agoTrac 75: fix uxexpected ssl connection close
AndyMcG [Sat, 5 Jul 2014 03:25:11 +0000 (11:25 +0800)]
Trac 75: fix uxexpected ssl connection close

10 years agoadd runtime context flag to enforce defeat of OS CA CERTS even if build option selected
Andy Green [Sat, 5 Jul 2014 02:59:59 +0000 (10:59 +0800)]
add runtime context flag to enforce defeat of OS CA CERTS even if build option selected

Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agofix confusion ull in latency reporting
Cong Ma [Sat, 5 Jul 2014 02:50:47 +0000 (10:50 +0800)]
fix confusion ull in latency reporting

10 years agopartial send handling
kolis [Sat, 5 Jul 2014 02:43:54 +0000 (10:43 +0800)]
partial send handling

10 years agodont free externally allocated user_space when closing connection
Andy Green [Sat, 5 Jul 2014 02:31:12 +0000 (10:31 +0800)]
dont free externally allocated user_space when closing connection

Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agofix build on OpenBSD
geq [Wed, 28 May 2014 04:52:18 +0000 (04:52 +0000)]
fix build on OpenBSD

10 years agoAdded HTTP OPTIONS support:
Andrew Canaday [Sat, 5 Jul 2014 02:04:19 +0000 (10:04 +0800)]
Added HTTP OPTIONS support:

     - added options to minilex.c
     - regenerated lextable.h
     - added WSI_TOKEN_OPTIONS_URI to libwebsockets.h
     - tweaked parsers.c to accommodate OPTIONS token
     - tweaked server.c to set uri_ptr and uri_len for HTTP callback on OPTIONS as well

10 years agoReducing CPU cycles spent calculating per-header length limit.
Andrew Canaday [Sun, 29 Jun 2014 05:34:24 +0000 (01:34 -0400)]
Reducing CPU cycles spent calculating per-header length limit.

10 years agoAdded docs for token limits.
Andrew Canaday [Sun, 29 Jun 2014 04:30:45 +0000 (00:30 -0400)]
Added docs for token limits.

10 years agoAdded optional per-header length limits:
Andrew Canaday [Sun, 29 Jun 2014 04:25:19 +0000 (00:25 -0400)]
Added optional per-header length limits:

 - libwebsockets.h:
 - * added struct lws_token_limits
   * added token limits pointer to lws_context_creation_info
 - private-libwebsockets.h: added token limits pointer to lws_context_creation_info
 - context.c: copy token limits in create_context
 - client.c / server.c: pass context when invoking libwebsocket_parse
 - parsers.c:
 - * libwebsocket_parse takes context pointer
   * issue_char takes context pointer and checks header length against context limits, if defined
   * issue_char returns 1 (not -1/0) for header too long, and spill: sets the state to WSI_TOKEN_SKIPPING

10 years agoAdded HTTP_STATUS_NO_CONTENT == 204
Andrew Canaday [Sun, 29 Jun 2014 23:14:43 +0000 (19:14 -0400)]
Added HTTP_STATUS_NO_CONTENT == 204

10 years agoAdded comma after if-none-match...
Andrew Canaday [Mon, 30 Jun 2014 09:54:16 +0000 (05:54 -0400)]
Added comma after if-none-match...

10 years agoAdded new HTTP headers and WSI tokens:
Andrew Canaday [Sun, 29 Jun 2014 00:19:57 +0000 (20:19 -0400)]
Added new HTTP headers and WSI tokens:

 - "access-control-request-headers:" <-- WSI_TOKEN_HTTP_AC_REQUEST_HEADERS
 - "if-none-match:" <-- WSI_TOKEN_HTTP_IF_NONE_MATCH

10 years agoclean partial send handling warning
Andy Green [Thu, 22 May 2014 03:12:15 +0000 (11:12 +0800)]
clean partial send handling warning

Reported-by: Michael Haberler <mail17@mah.priv.at>
Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agoPartial send handling
kolis [Mon, 19 May 2014 12:40:50 +0000 (14:40 +0200)]
Partial send handling

AG removed what looked like redundant set eff_buf.token_len <- n

10 years agoFix for binding socket to a specific interface (fixes #116)
vpeter4 [Sun, 27 Apr 2014 10:32:15 +0000 (12:32 +0200)]
Fix for binding socket to a specific interface (fixes #116)
 also allow binding to IP address with @iface info.iface = "eth0"; info.iface
 = "192.168.1.5";

10 years agoTurn off IPv6 in windows for now
Joakim Soderberg [Thu, 24 Apr 2014 12:47:10 +0000 (14:47 +0200)]
Turn off IPv6 in windows for now

It's horribly broken
AG: issue seems to be size of the addr struct as suggested on the list

10 years agoConditionally declare variable
vpeter4 [Sun, 27 Apr 2014 11:22:09 +0000 (13:22 +0200)]
Conditionally declare variable

10 years agoCompile with older OpenSSL library (missing symbol SSL_set_tlsext_host_name)
vpeter4 [Sun, 27 Apr 2014 10:52:21 +0000 (12:52 +0200)]
Compile with older OpenSSL library (missing symbol SSL_set_tlsext_host_name)

10 years agoDisable compile error: statement with no effect
vpeter4 [Sun, 27 Apr 2014 11:35:28 +0000 (13:35 +0200)]
Disable compile error: statement with no effect

10 years agoDisable compile warning: no newline at end of file
vpeter4 [Sun, 27 Apr 2014 11:28:22 +0000 (13:28 +0200)]
Disable compile warning: no newline at end of file

10 years agointroduce LWS_FEATURE_ tests
Andy Green [Sun, 20 Apr 2014 23:27:19 +0000 (08:27 +0900)]
introduce LWS_FEATURE_ tests

Help user code be compatible with multiple LWS versions by
providing #ifdef -testable flags for API changes

Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agolibev stub macros need to reflect void when disabled
Andy Green [Sun, 20 Apr 2014 22:59:44 +0000 (07:59 +0900)]
libev stub macros need to reflect void when disabled

Reported-by: Michael Harberler <mail17@mah.priv.at>
Signed-off-by: Andy Green <andy.green@linaro.org>
10 years agoWindows: Fix implementation of lws_plat_inet_ntop()
Patrick Gansterer [Tue, 15 Apr 2014 16:45:48 +0000 (18:45 +0200)]
Windows: Fix implementation of lws_plat_inet_ntop()

We need to pass a sockaddr_in6 struct to WSAAddressToString() to have a
working implementation for IPV6. Also use the WideChar version to allow
compilation on Windows CE too.

10 years agoWindows: Use gai_strerrorW() instead of gai_strerror()
Patrick Gansterer [Tue, 15 Apr 2014 16:42:57 +0000 (18:42 +0200)]
Windows: Use gai_strerrorW() instead of gai_strerror()

This allows compilation on Windows CE too.

10 years agoWindows: Fix the passed parameter to the setsockopt function
Patrick Gansterer [Tue, 15 Apr 2014 16:41:38 +0000 (18:41 +0200)]
Windows: Fix the passed parameter to the setsockopt function

This avoids compiler warnings about missmatched parameter types.