1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
Commit graph

525 commits

Author SHA1 Message Date
Andy Green
f1cf5bec53 version 1.6.0
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-18 11:19:45 +08:00
Andy Green
11c05bfa09 public api remove superfluous context params API BREAK
Extend the cleanout caused by wsi having a context pointer
into the public api.

There's no point keeping the 1.5 compatibility work,
we have changed the api in several places and
rebuilt wasn't going to be enough a while ago.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-16 18:19:08 +08:00
Roger A. Light
e59908e7fc Subject: [PATCH] Add LWS_LIBRARY_VERSION_NUMBER to lws_config.h.
This changeset adds a few preprocessor macros to lws_config.h to allow
a user of libwebsockets to determine at compile time which version of
lws they are compiling against.

This exposes the already existing LWS_LIBRARY_VERSION_MAJOR and _MINOR
values, and adds LWS_LIBRARY_VERSION_PATCH. This suggests that future
minor bugfix release versions of lws would be e.g. 1.6.0 -> 1.6.1 rather
than the style used previously: 1.2 -> 1.21.

The way this is currently set up means new minor revisions (with
_PATCH==0) always end with .0 but I could change this if preferred.

The most important addition is LWS_LIBRARY_VERSION_NUMBER, which
produces a number of the form 1005001 for version 1.5.1 - i.e. each part
major, minor, patch can extend from 0-999. This macro allows a very easy
compile time comparison of version numbers.
2015-12-15 19:49:55 +08:00
Andy Green
ac19bf6801 soname bump
See

http://ml.libwebsockets.org/pipermail/libwebsockets/2015-December/002052.html

for the reason

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-08 11:06:28 +08:00
Charles Prevot
90a0dd6b75 cmake additionally install cmake config 2015-12-08 10:26:57 +08:00
Andy Green
6d41720233 api rationalization add cmake switch to export old api wrappers
This is off by default, use

 -D LWS_WITH_OLD_API_WRAPPERS=1

on cmake to get the old api names exported from the library as wrappers
around the new api names.

This allows the library to continue to be compatible with apps that are
not rebuilt with the new libwebsockets.h api compatibility defines.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-04 10:39:23 +08:00
Peter Pentchev
bb085dab04 Fix some minor typos. 2015-12-03 22:32:59 +08:00
Andy Green
abc8635824 osx clang blows up if pthreads flag at link time 2
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-29 20:17:49 +08:00
Andy Green
09b8a71b14 osx clang blows up if pthreads flag at link time
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-29 19:41:13 +08:00
Andy Green
1700265081 osx clang quench deprecated api errors
after approach by redhat

https://bugzilla.redhat.com/show_bug.cgi?id=1155181

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-29 19:19:09 +08:00
Andy Green
b39c22fc38 issue 352 clang is like gcc for cmake purposes
After ohauer

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

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-29 18:52:37 +08:00
Andy Green
b7fed3532a test server pthreads
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-20 09:51:42 +08:00
Andy Green
eb15ea0198 refactor test server
Split test-server into four C files and a header

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-19 13:55:47 +08:00
Andy Green
5f2a8155f1 mbed3 build support
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-14 15:01:37 +08:00
Andy Green
9ffb42efec cmake force internal SHA1 if no ssl
https://github.com/warmcat/libwebsockets/issues/342

You have to explicitly disable LWS_WITHOUT_BUILTIN_SHA1 Cmake option
alomg with SSL to disable SSL

cmake .. -DLWS_WITH_SSL=OFF -DLWS_WITHOUT_BUILTIN_SHA1=OFF

This makes that implicit with disabling SSL.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-11-09 04:24:46 +08:00
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
ab620ffde3 release v1.5
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-28 08:39:09 +08:00
Alexander Lukichev
fe6030a62b Make LWS_SEND_BUFFER_PRE_PADDING preprocessor if-friendly
Commit 173e9c4e made LWS_SEND_BUFFER_SIZE a multiple of a certain
value returned by _LWS_PAD_SIZE macro. This macro expanded to
"sizeof(void *)" on non-x86_64 architectures, which made it
unsuitable to use LWS_SEND_BUFFER_SIZE in preprocessor #if
expressions in the library user code.

This patch preserves the padding logic since commit 173e9c4e but
makes it more preprocessor-friendly for applications using
libwebsockets by setting _LWS_PAD_SIZE to the size of "void *"
determined by cmake when libwebsockets is configured for the
target platform.

Signed-off-by: Alexander Lukichev <alexander.lukichev@gmail.com>
2015-10-21 12:52:15 +02:00
Peter Pentchev
e46f4125ef Fix some typographical and grammatical errors 2015-10-15 11:58:54 +08:00
Andy Green
4c79ee7598 LWS_WITHOUT_BUILTIN_SHA1
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-10-15 11:20:40 +08:00
Bruce Perens
e38b8505b7 remove O3 if cmake debug build 2015-10-15 08:46:29 +08:00
Roger A. Light
7a474b4e2d Separate private defines in lws_config_private.h
So we don't expose all HAVE_ macros and such to the world.
2015-10-12 10:10:20 +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
Roger A. Light
b6147fd2e5 Fix shared library name for all platforms
This is a further fix to f1b1254, building on 26fd0d2.

Tidy up the LWS_WITH_SHARED and LWS_WITH_STATIC options.
2015-10-12 08:27:38 +08:00
ABruines
80a7068ec8 Allow using CyaSSL in stead of wolfSSL 2015-10-12 08:17:55 +08:00
Alexander Bruines
c3bcb89d01 Move from CyaSSL to wolfSSL
This patch lets libwebsockets use the lastest version of wolfSSL (the new name for CyaSSL).
The reason for the patch is that allthough wolfSSL provides compatibility headers for (old) projects using CyaSSL,
these are incomplete and do not work for libwebsockets.

The patch also fixes a typo in CMakeLists.txt where CYASSL_LIBRARIES was added to include_directories() instead of CYASSL_INCLUDE_DIRS.

Signed-off-by: ABruines <alexander.bruines@gmail.com>
2015-10-12 08:14:50 +08:00
Andy Green
3ae1badae7 cmake remove targets from install path
No package on my machine populates cmake files, I think it's extraneous.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-04-29 22:40:55 +08:00
Andy Green
26fd0d2603 cmake revert change to linux so
Put back the stanza fixing the .so name to what it has always been
on Linux, trashed in f1b12544

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-04-29 19:28:37 +08:00
wonder-mice
f1b125442b Subject: [PATCH] Multiple changes in the build process
* Default CMAKE_BUILD_TYPE to Release
* Use CMAKE_BUILD_TYPE to define _DEBUG (NDEBUG is more standard though,
  but cmake defines it)
* Drop LWS_WITHOUT_DEBUG (use CMAKE_BUILD_TYPE for that)
* Drop LWS_NO_EXTERNAL_POLL (was not used)
* Drop CMAKE_BUILD (CMake is the only build system now)
* Add LWS_WITH_STATIC and LWS_WITH_SHARED to choose what version(s) to
  build
* Add LWS_XXX_LIBRARIES and LWS_XXX_INCLUDE_DIRS for each library
  dependency (zlib, openssl, libev, cyassl)
* Support setting of XXX_LIBRARIES, XXX_LIBRARIES and XXX_INCLUDE_DIRS
  by parent project (when included with add_subdirectory())
* Rename LWS_USE_EXTERNAL_ZLIB to LWS_USE_BUNDLED_ZLIB and default it to
  NO (since it's Windows only)
* Default LWS_WITHOUT_DAEMONIZE to NO (since network lib shouldn't know
  how to do it anyway)
* Rename config.h.cmake to lws_config.h.in
* Rename shared library to websockets_shared so linker will not be
  confused
* Fix inline keyword detection in clang
* Explicitly set MACOSX_RPATH to YES on MacOS
2015-04-24 07:27:18 +08:00
wonder-mice
67e246fce9 Subject: [PATCH] Be quite when executing openssl commands 2015-04-23 06:13:05 +08:00
wonder-mice
dd32c24df6 refactor allow http parse also for client 2015-04-23 05:37:46 +08:00
Andy Green
16fb0132ce prepare for v1.4
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-03-28 11:35:40 +08:00
Roger A. Light
1677ca52ca Subject: [PATCH] Windows installer related fixes.
Remove incorrectly committed cpack changes.
Fix call to makensis.
Update README filenames.
2015-03-11 08:48:39 +08:00
Roger A. Light
12126d701e Add Windows installer file and configure appveyor to create it
Also update OpenSSL on Windows to latest version.
2015-03-10 21:18:22 +08:00
Roger Light
b8639543bc Subject: [PATCH] Simplify soversion. 2015-02-17 21:13:10 +08:00
Steven Lai
ba3c75c065 Add compiler checking for visibility flag
Signed-off-by: Steven Lai <steven.lai@liricco.com>
2015-01-27 19:46:26 +08:00
Quinlan Pfiffer
363420dff4 cmake ipv6 default to off
Signed-off-by: Quinlan Pfiffer <qpfiffer@gmail.com>
2015-01-26 11:24:03 +08:00
Alejandro Mery
cdc9717be1 Subject: [PATCH] Add custom allocator support using the realloc() interface
Signed-off-by: Alejandro Mery <amery@geeks.cl>
2014-12-05 07:25:24 +08:00
Samuel Martin
a11a28278f Subject: [PATCH] cmake: set the project language
By default, CMake sets C and C++ as languages used by the project.
This makes the configuration failed if no C++ compiler is found.

Since libwesockets in written in pure C, no C++, there is no reason to
disable it when the toolchain has no C++ support.

This patch just make the CMake code reflecting the real status of the
project with regard to the languages used.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2014-11-27 09:14:31 +08:00
Christoph Muellner
b921e521cd Subject: [PATCH] Adding lws_config.h to list of installed headers.
The lws_config.h is generated based on configuration
options for the build process. In order to write
applications which compile code depending of the
presence of a feature (like the test-server does)
this header file needs to be installed.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2014-11-27 06:25:16 +08:00
Joakim Soderberg
1632c9a894 CLang gives an error on -O4
clang: error: -O4 is equivalent to -O3
2014-11-26 01:22:50 +08:00
Joakim Soderberg
bf3e8a998e Subject: [PATCH] BUGFIX: Failed to get proper output dir for test-server
When creating the directory where to put the files needed by the test-server CMake would fail because it tried to create the directory /../share/libwebsockets-test-server, which is not possible. This happens since the TARGET_FILE_DIR for the test-server is not fetched properly.

Also mentioned in this trac ticket:
http://libwebsockets.org/trac/libwebsockets/ticket/84
2014-11-25 05:49:11 +08:00
Andy Green
7df53c5550 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>
2014-10-22 15:38:12 +08:00
Andy Green
2add6340d5 http2 hpack basic decode ok including huff
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-12 08:38:16 +08:00
Andy Green
024eb6c80c http2 can keep upgraded connection up
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-10-08 12:00:53 +08:00
Hiroaki Sakon
c00675cafb fix required CMake version
AG also updated the machine-readable min cmake version
2014-09-23 02:35:05 +08:00
Andy Green
9ffe40112b soname 5.0.0
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-08-18 23:21:28 +08:00
Joakim Soderberg
46e48868ac 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
2014-04-28 07:32:14 +08: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
a717df2739 refactor libev eliminate all code ifdefs
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-11 13:14:37 +08:00