Commit graph

902 commits

Author SHA1 Message Date
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
Andy Green
03cf1dde39 truncated send issue independent of LWS_NO_EXTENSIONS 2
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-01 14:20:44 +08:00
Andy Green
f9196dd85c truncated send issue independent of LWS_NO_EXTENSIONS
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-01 11:24:44 +08:00
Andy Green
5bc002e424 only use clean buffer for failed write if sent something
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-01 09:59:39 +08:00
Andy Green
4dd338590e libev protect when disabled at runtime in server.c
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-01 08:36:36 +08:00
Andy Green
8c2c92491e win32 clean remove leftover ifdef
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-03-31 22:03:09 +08:00
Andy Green
4e1462d890 fix libev build
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-03-31 14:42:56 +08:00
Andy Green
bfaea95f60 clean libwebsockets.c
Signed-off-by: None <None>
2014-03-31 11:01:32 +08:00
Patrick Gansterer
b13eed4dcc Cleanup header includes 2014-03-30 10:19:23 +02:00
Patrick Gansterer
ac49f1e97f Remove useless usage of ssize_t 2014-03-30 10:18:51 +02:00
Patrick Gansterer
c3e8337bbd Windows: Support LWS_POLLHUP socket event 2014-03-30 09:54:55 +02:00
Patrick Gansterer
b47f87b04b Introduce LWS_POLLIN, LWS_POLLOUT and LWS_POLLHUP 2014-03-30 09:18:05 +02:00
Andy Green
e85ddb4822 Merge branch 'tid' of https://github.com/paroga/libwebsockets 2014-03-30 09:48:59 +08:00
Patrick Gansterer
0bf8fe51bf Add missing resetting of the service_tid on Windows 2014-03-29 09:34:24 +01:00