Commit graph

23 commits

Author SHA1 Message Date
Stephan Eberle
b820e2c2cc Implemented fixes allowing libwebsockets to be built under Windows using MinGM/MSYS
Improvemed patches to address travis and appveyor build errors

Reduced WINVER and _WIN32_WINNT to 0x0501 to be less restrictive

Refined CMakeLists.txt to allow for normal Windows and MinGW-specific OpenSSL certificate generation

Simplified include path to gettimeofday.h

Removed unnecessary list(APPEND LWS_LIBRARIES zlib_internal) export

Added back #include <windows.h> to gettimeofday.c to fix build for normal Windows

Made sure that pollfd gets defined on libwebsockets side when _WIN32_WINNT < 0x0600

Made sure that WINVER and _WIN32_WINNT don't get overridden by libwebsockets headers when already set to something greater than 0x0501

Added missing declaration of WSAPoll function for WINVER < 0x0600 in libwebsockets.h, eliminated invalid usages of pollfd instead of libwebsocket_pollfd in test-server.c

Cleaned up duplicate content in gettimeofday.c, removed header inclusions from gettimeofday.h and fixed include order in test-echo.c, test-ping.c and test-server.c to enable build with normal Windows and MinGW

Re-enabled debug_level in test-echo.c and made sure that the call to lws_set_log_level() is also active under Windows (just like in test-server.c); replaced all WIN32 occurrences by _WIN32 in test-echo.c, test-ping.c, and test-server.c

Removed build-msys.sh and added new section about how to build libwebsockets using MinGW to README.build.md
2015-10-30 00:16:40 +01:00
Andy Green
f7e2a85e11 complain if zero ka_interval used with positive ka_time
https://github.com/warmcat/libwebsockets/issues/308

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-16 10:54:04 +08:00
Andrew Canaday
79d09fcc37 WHOOPS! Stuck the sigint init int the wrong function. 2015-10-12 11:19:55 +08:00
Andrew Canaday
6740b70aaf Set default libev-related SIGINT handling at context create
to avoid breaking backwards compatibility with existing deploys.
2015-10-12 11:18:23 +08:00
=?UTF-8?q?Joakim=20S=C3=B6derberg?=
caf7e3d63b Fix potential memory leak
- Got rid of ifdef _WIN32 stuff adn moved to plat_ files instead.
- Also, check all calls to lws_zalloc, was potential failure on WIN32
- Made context destory enable to destroy a half inited context as well. This way I got get rid of some of the error handling complexity in libwebsocket_create_context
- Added TODOs for some potential problems I see where things might be leaking and such
2015-10-12 10:05:18 +08:00
=?UTF-8?q?Joakim=20S=C3=B6derberg?=
cefab311d6 Use LWS_HAVE_ instead of just HAVE_
Since we include lws_config.h in the public headers, at least our HAVE_ macros should be kind of unique, so that we don't get redefinitions when used with other libraries using config files as well.
2015-10-12 09:53:17 +08:00
Andy Green
bddb3dcce9 context destroy just kill wsis ugh add missing bit
Unsaved file...

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-03-28 10:35:53 +08:00
banthonywalker
dd020b4b04 Subject: [PATCH 1/2] fix win32 context memory leak 2015-03-10 21:53:17 +08:00
Bud Davis
229bfec948 win32 use hashtable for fd management
At least some win32 uses an opaque pointer for fd that is not
an ordinal like it is in unix.

Resurrect the old hashtable management for that platform to use
instead, and introduce a helper to get the wsi from the fd "somehow".

Signed-off-by: Bud Davis <bdavis9659@gmail.com>
2015-01-30 10:48:57 +08:00
Alejandro Mery
6ff28248aa Subject: [PATCH] Use custom allocator
Signed-off-by: Alejandro Mery <amery@geeks.cl>
2014-12-05 07:26:26 +08:00
Andy Green
0c51239023 ssl clean recent external CTX patch so doesnt break build
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-17 08:47:51 +08:00
joseph.urciuoli
4d9c8fc01a ssl allow externally managed SSL_CTX
Signed-off-by: joseph.urciuoli <trac90@UNKNOWN.org>
2014-10-16 08:53:19 +08:00
Andy Green
67f94599d2 trac82 consistently use CONTEXT_PORT_NO_LISTEN
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-07-31 09:44:00 +08:00
Aurelian Pop
d07ea3bf40 Fix TCP keepalive use in UNIX systems 2014-07-29 15:36:06 +03:00
Andrew Canaday
74b4a65745 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
2014-07-06 09:33: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
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
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
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
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