Commit Graph

1338 Commits

Author SHA1 Message Date
2f560ff4c0 Update IXWebSocketVersion.h v11.4.2 2022-04-28 23:56:40 -07:00
002d9c8985 Update ixwebsocket-config.cmake.in (#390) 2022-04-28 23:56:00 -07:00
6d8495bd73 Update CHANGELOG.md v11.4.1 2022-04-23 22:53:36 -07:00
b8563eddd1 11.4.1 2022-04-23 22:52:32 -07:00
46bd2aa4a1 vcpkg zlib dep fix (#385)
* vcpkg zlib dep fix

* Use cmake.in file instead of write file directly

Co-authored-by: Cheney-Wang <v-xincwa@microsoft.com>
2022-04-23 18:16:13 -07:00
4420bc70b5 Revert "Export static symbols when building ws with shared library (#370)" (#383)
This reverts commit a3d2fa4b7e.
2022-04-12 08:55:43 -07:00
20921f341a Update README.md 2022-03-28 22:04:27 -07:00
2829c62ef9 Fix error handling after calling X509_NAME_get_index_by_NID
This should fix #376
2022-03-27 19:14:40 -07:00
a3d2fa4b7e Export static symbols when building ws with shared library (#370) 2022-03-19 11:41:40 -07:00
f7eb3688dd Update IXExponentialBackoffTest.cpp v11.3.3 2022-02-17 09:17:47 -08:00
7360333aca Handle overflow in IXExponentialBackoff.cpp 2022-02-17 09:17:02 -08:00
90f19e0280 Reference new IXExponentialBackoffTest test in CMakeLists.txt 2022-02-17 09:08:49 -08:00
b72f81540b Create IXExponentialBackoffTest.cpp 2022-02-17 09:07:46 -08:00
a77fd2d698 Update catch to v2.13.8 (#365) 2022-02-17 08:38:46 -08:00
e12a6ddbdd Update IXSocketConnect.cpp (#356)
Part of the code is never executed
warning raised by clang
2022-02-10 20:50:55 -08:00
127cc4a023 Fix for MINGW32 and clang on windows (#352) (#357)
* Update IXSocket.h

Avoid "conflicting declaration 'typedef SSIZE_T ssize_t'"

* Update IXUdpSocket.h

* Update IXNetSystem.cpp

ENOSPC and EAFNOSUPPORT are not defined for clang on windows
2022-02-10 20:49:33 -08:00
7711cb1ae7 Feature/no libdeflate (#360)
remove libdeflate code in gzip codec
2022-02-10 20:47:32 -08:00
db7057de69 Add support for streaming transfers (#353)
This change adds onChunkCallback to the request. If defined it will be
called repeatedly with the incoming data. This allows to process data on
the go or write it to disk instead of accumulating the data in memory.
2022-01-31 21:54:32 -08:00
c28b569535 Edit doc about thread safety, fix #350 2022-01-28 16:27:45 -08:00
8d661b8e81 Use Threads::Threads target (#349) 2022-01-16 17:39:21 -08:00
a951bc9cae Add an alias for ixwebsocket (#348) 2022-01-16 17:36:38 -08:00
b5cf33a582 Introduction of IXWebSocketSendData (#347)
* Introduction of IXWebSocketSendData that makes it possible to not only send std::string but also std::vector<char/uint8_t> and char* without copying them to a std::string first.

Add a sendUtf8Text() method that doesn't check for invalid UTF-8 characters. The caller must guarantee that the string only contains valid UTF-8 characters.

* Updated usage.md: sendUtf8Text() and IXWebSocketSendData
2022-01-10 10:34:24 -08:00
2bc3afcf6c Fixed missing header for gcc (9.3.0) compilation (#346) 2022-01-06 19:27:00 -08:00
60563d88f2 Feature/11.4.0 (#344)
* mbedls system certs

* missing curly brace ...

* windows uwp for appveyor

* try again uwp

* update version and changelog

* revert odd change in test/IXSocketTest.cpp

Co-authored-by: Benjamin Sergeant <bsergeant@mz.com>
2022-01-05 10:43:18 -08:00
1f2895a469 Win wsa select event (#342)
* Fix #323: Missing SelectInterrupt implementation for Windows

Using WSAEventSelect, WSAWaitForMultipleEvents and WSAEnumNetworkEvents to emulate poll() with an interrupt-event.

* Cleanup

* Fixed incomplete comment.

* Switched ifdefs to support other Unixes with pipe file descriptors

* Fixed: SelectInterrupt fallback code for getFd()==-1 && getEvent()==nullptr converted a PollResultType::Timeout into a ReadyForRead causing the HttpClient to fail because it uses a hard-coded "SelectInterrupt" instance that doesn't implement getFd() and getEvent().

* Fixed gcc compile errors

* - HttpClient now uses the SelectInterruptFactory
- Fixed wrong ix::poll result when using Windows WSA functions

* We must deselect the networkevents from the socket event. Otherwise the socket will report states that aren't there.
2022-01-05 10:21:33 -08:00
9f00428d57 Fix "HTTP/1.1 400 Illegal character CNTL=0xf" caused by serverMaxWindowBits/clientMaxWindowBits being uint8_t (signed char). (#341) 2022-01-04 12:25:18 -08:00
f53b2f8878 Export symbols into .def files on MSVC (#339)
Fix #335
2022-01-04 12:13:38 -08:00
47d0b70ebf Include <cerrno> to provide standard error constants (#338)
See https://en.cppreference.com/w/cpp/header/cerrno for additional details. Some of used constants are defined in this header.

Inclusion is necessary to avoid these errors:

```
/home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:189:30: error: use of undeclared identifier 'EAFNOSUPPORT'
            default: errno = EAFNOSUPPORT; return 0;
                             ^
/home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:191:17: error: use of undeclared identifier 'ENOSPC'
        errno = ENOSPC;
                ^
/home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:175:25: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
                    j = strspn(buf + i, ":0");
                      ~ ^~~~~~~~~~~~~~~~~~~~~
/home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:234:21: error: use of undeclared identifier 'EAFNOSUPPORT'
            errno = EAFNOSUPPORT;
                    ^
2 warnings and 3 errors generated.
```
2022-01-04 12:13:19 -08:00
8c15405ed0 Add a reference to NovaCoin in the README 2021-12-22 22:52:53 -08:00
5457217503 Improved compatibility - fix mingw crossbuild (#337) 2021-12-22 22:48:20 -08:00
66cd29e747 Allow to cancel asynchronous HTTP requests (#332)
Usage:

	auto args = this->httpClient.createRequest(url, method);
	httpClient.performRequest(args, ...);
	[...]
	// Oops, we don't actually want to complete the request!
	args->cancel = true;
2021-12-20 23:01:55 -08:00
688f85fda6 Fix errors in example code. (#336) 2021-12-20 22:59:15 -08:00
71f73e5f6e Update README (add another project using the lib) 2021-12-02 22:49:12 -08:00
42db05a38b Update mkdocs.yml 2021-11-24 09:05:54 -08:00
6cce066021 Update index.md 2021-11-24 09:02:42 -08:00
9c6dcb24a9 Update mkdocs.yml 2021-11-24 09:01:10 -08:00
05a27c89e3 Update design.md 2021-11-24 09:00:23 -08:00
23dbc8ae63 Update mkdocs.yml
Try a new version of the checkout action.
2021-11-24 08:56:14 -08:00
5f2955ef78 Feature/version 11.3.2 (#329)
* mbedls system certs

* missing curly brace ...

* windows uwp for appveyor

* try again uwp

* bump version

* keep using local cacert.pem in unittest

* appveyor back to normal

* remove appveyor file

Co-authored-by: Benjamin Sergeant <bsergeant@mz.com>
v11.3.2
2021-11-24 08:45:04 -08:00
882081536c Fix IXWebSocketMessage.h:35:15: warning: ‘webSocketMessageType’ may be used uninitialized in this function [-Wmaybe-uninitialized] (#328) 2021-11-24 08:33:09 -08:00
74bb85efe9 Add getters (#327)
* Add getters for IXSocketServer class

* Add getters for IXHttpServer class

* Add getters for IXWebSocketServer class
2021-11-24 08:28:25 -08:00
e66437b560 fix compilation under mingw64 (#325) 2021-11-16 15:22:51 -08:00
97aa1f956a Fix mbedtls-3.0 problem (#322)
* Fix mbedtls-3.0 problem

This cause CI to fail on macOS.

See this migration guide => https://github.com/ARMmbed/mbedtls/blob/development/docs/3.0-migration-guide.md

* cmake change find header file

* define macro for mbedtls >= 3

* update api call

* Update IXWebSocketVersion.h

* Update CHANGELOG.md
v11.3.1
2021-10-22 11:10:58 -07:00
3f1fc6906c Correctly convert remote port bytecode to uint16 port number. (#321)
* Correctly convert remote port bytecode to uint16 port number.

Copied the network_to_host_short function from the ASIO library to convert the remote port byte code to a uint16 number.

* Switched from uint16_t to unsigned short to work in Windows

* Updated missed uint16_t to unsigned short
2021-10-22 10:23:43 -07:00
9bbd1f1b30 Update package-lock.json
Fix a security issue with the node.js ws package, which is only used in testing.
2021-09-29 12:18:15 -07:00
18c2b69633 Update build.md 2021-09-29 12:15:31 -07:00
178f218374 Update IXWebSocketVersion.h 2021-09-20 18:19:29 -07:00
6a1aa27b5f Update CHANGELOG.md 2021-09-20 18:19:10 -07:00
e7f89ae529 Only find OpenSSL, MbedTLS, zlib if they have not already been found, make CMake install optional. (#307)
Co-authored-by: Benjamin Sergeant <bsergean@gmail.com>
2021-09-20 18:15:37 -07:00
cdeaf8e2be use GNUInstallDirs in cmake (#318)
Signed-off-by: NexAdn <git@nexadn.de>

Co-authored-by: NexAdn <git@nexadn.de>
2021-09-20 18:11:46 -07:00