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.
```
* 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>
* 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
* Fix unsafe calls and safeguard WebSocketMessage from being called w/
temporaries
* Use unnamed namespace to express internal linkage
* Avoid returning references that are mutex protected
Motivation for this MR
The antipattern of returning references to mutex protected members was
removed. Since a caller can hold the reference it would make all class
level locking meaningless.
Instead values are returned. The IXWebSocketPerMessageDeflateOptions
class was shrunk by 7 bytes (1 padding + 2*3) after changing the int
members to the used uint8_t; side effects of that were handled.
An inefficient "string -> int" was replaced by standard library. As
seen here http://coliru.stacked-crooked.com/a/46b5990bafb9c626 this
gives an order of magnitude better performance.
* noexcept string to integer conversion
* Fix unsafe calls and safeguard WebSocketMessage from being called w/
temporaries
* Use unnamed namespace to express internal linkage
* Avoid returning references that are mutex protected
Motivation for this MR
The antipattern of returning references to mutex protected members was
removed. Since a caller can hold the reference it would make all class
level locking meaningless.
Instead values are returned. The IXWebSocketPerMessageDeflateOptions
class was shrunk by 7 bytes (1 padding + 2*3) after changing the int
members to the used uint8_t; side effects of that were handled.
An inefficient "string -> int" was replaced by standard library. As
seen here http://coliru.stacked-crooked.com/a/46b5990bafb9c626 this
gives an order of magnitude better performance.