vpeter4
7c00fc3d9d
Disable compile error: statement with no effect
2014-04-27 13:35:28 +02:00
vpeter4
4dd8ada592
Disable compile warning: no newline at end of file
2014-04-27 13:28:22 +02:00
Andy Green
6ea337aa3e
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>
2014-04-21 08:27:19 +09:00
Andy Green
1b2fc03f24
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>
2014-04-21 07:59:44 +09:00
Patrick Gansterer
c11b847fa8
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.
2014-04-15 18:45:48 +02:00
Patrick Gansterer
fb9dc57068
Windows: Use gai_strerrorW() instead of gai_strerror()
...
This allows compilation on Windows CE too.
2014-04-15 18:42:57 +02:00
Patrick Gansterer
fe0ca596d6
Windows: Fix the passed parameter to the setsockopt function
...
This avoids compiler warnings about missmatched parameter types.
2014-04-15 18:41:38 +02:00
Patrick Gansterer
a6b019aaee
Declare the lws_ssl_capable_*_no_ssl function outside the SSL #ifdef
...
This avoids a compiler warning about a not declared function.
2014-04-15 18:40:31 +02:00
Patrick Gansterer
6bb4b62ede
Fix compilation on Windows CE after cleanup
2014-04-15 18:39:26 +02:00
Patrick Gansterer
1077e1f4d2
Fix include statement of in6addr.h
...
Only include it when CMake can find it. This works with MinGW and WinCE.
2014-04-15 18:38:54 +02:00
Andy Green
f004ec594e
rxflow just return 0 when changing state
...
Nobody cares if we changed state, and callers are
increasingly taking nonzero as fail, causing us to
drop the connection when we re-enable rxflow.
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-12 11:47:25 +08:00
Andy Green
0f58db3940
windows ipv6 add necessary header
...
Thanks to Marjan and Joakim
https://github.com/warmcat/libwebsockets/issues/108#issuecomment-40075600
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-12 11:31:40 +08:00
Andy Green
cdb9bf9bdd
refactor move ssl server service to ssl.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-12 10:07:02 +08:00
Andy Green
a717df2739
refactor libev eliminate all code ifdefs
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-11 13:14:37 +08:00
Andy Green
f4ffc1e215
fixes for close flush
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 17:06:59 +08:00
Andy Green
e7016aae2b
fixup no extentsion around last clean
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 15:15:13 +08:00
Andy Green
a1a24d26a6
close should flush any truncated send before really closing
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 14:25:24 +08:00
Andy Green
d7340c141f
clean=various ifdef reduction
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 14:08:10 +08:00
Andy Green
15d56dd9da
truncated send always callback on writeable
...
Suggested by a Windows log where leaf.jpg meets EAGAIN and after
issuing the truncated send buffer, never sends any more
https://github.com/warmcat/libwebsockets/issues/111#issuecomment-39873129
Added note in README.coding about WRITEABLE callbacks able to
be generated by lws.
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 11:23:18 +08:00
Andy Green
fe660b5c4b
inform timeout source when TIMEDOUT_WAITING
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 11:03:22 +08:00
Andy Green
5b08f12fe8
docs clarify create context comment threading not supported
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-10 10:13:43 +08:00
Andy Green
47e0c91e2f
move SNI temp var back one
...
Reported as making trouble on Windows by spayton
https://github.com/warmcat/libwebsockets/issues/109
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-08 16:15:02 +01:00
Andy Green
1a308e4176
define LWS_SSL_CAPPABLE return codes even when no SSL enabled
...
Reported by fuzzy
https://github.com/warmcat/libwebsockets/issues/107
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-08 07:26:30 +01:00
spayton
5b94c3b449
Update private-libwebsockets.h
...
fixes windows http file serve - macro compatible_file_read() incorrectly used 'amount' instead of '_amount'
2014-04-08 07:22:53 +01:00
Joakim Soderberg
d2f5b199bc
windows Fix build.
2014-04-07 13:13:45 +01:00
Andy Green
e9b61b5ba5
windows clean out redundant inet_ntop prototype
...
Suggested by Joakim Soderberg https://github.com/warmcat/libwebsockets/issues/103#issuecomment-39684559
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-07 06:25:07 +01:00
Andy Green
529d4814d0
fix ssl error reporting
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 12:41:31 +01:00
Andy Green
485abc1c66
allow signals during send
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 12:41:20 +01:00
Andy Green
8e18fe3a94
fix accept nonzero as close from WRITEABLE callback
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 12:40:16 +01:00
Andy Green
78f266a525
refactor use unified ssl read write functions
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 07:24:45 +01:00
Andy Green
02138126f2
refactor add ssl read write single implementation
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-06 06:26:35 +01:00
Andy Green
b25b85f606
windows allow syslog log target to mao to stderr
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 23:34:09 +08:00
Andy Green
92795d64db
windows fix breakage from plat refactor
...
Reported-by Marjan Tomas
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 22:38:49 +08:00
Andy Green
a5fe1192cf
windows fix SetFilePointer args
...
This restricts it to 4GB files on 32-bit Windows but it'll do for now.
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 19:52:37 +08:00
Andy Green
2eedea9884
http2 add initial alpn support
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 14:33:48 +08:00
Andy Green
c57037a555
refactor ssl related code into ssl.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 10:17:00 +08:00
Andy Green
b49a995a8d
clean small additional ifdef reduction
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 10:11:04 +08:00
Andy Green
aad2eac48e
refactor handshake client and server handling into client.c and server.c
...
Eliminate more #ifdefs
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 09:03:37 +08:00
Andy Green
d99476b2b3
refactor move flow control to server.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 08:40:05 +08:00
Andy Green
e38031a394
refactor migrate client and server specific context init into client.c and server.c
...
Eliminate some NO_CLIENT and NO_SERVER
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 08:24:29 +08:00
Andy Green
34f3dd2082
refactor pollfd related functions into pollfd.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 07:43:42 +08:00
Andy Green
d474135424
refactor service related functions into service.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 07:43:40 +08:00
Andy Green
3d67f515db
refactor context related functions into context.c
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 07:29:50 +08:00
Andy Green
0d4a346177
remove libev build tag
...
It's told during context init if it uses libev or not in the logs
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 07:17:10 +08:00
Andy Green
a654fc0d50
clean move lws_plat externs
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-03 07:16:40 +08:00
Andy Green
1cd3ba6fdc
ipv6 use lws_plat_ to avoid win naming collision
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 23:03:23 +08:00
Andy Green
5266f66f50
win32 inet_top
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 21:31:07 +08:00
Andy Green
e40aa9b920
plat change to build selection by cmake
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 21:04:03 +08:00
Andy Green
2c24ec0211
refactor out most NO_EXTENSIONS
...
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 19:45:42 +08:00
Andy Green
158e804cb7
refactor out WIN32 tests from code
...
This gets rid of all the platform-dependent #ifdef stuff and
migrates it into the new lws-plat-xxx.c files.
These are then included in a one-time test in libwebsockets.c
according basically to Windows or not.
The idea is from now on, all Windows-specific code should go in
lws-plat-win.c, where any kind of Windows perversion like DWORD
is fine.
Any new functions going in there should be named lws_plat_...
and be defined in all the lws-plat-xxx.c file (currently just
win32 and unix platforms are supported).
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 14:25:10 +08:00