Compare commits

..

6 Commits

Author SHA1 Message Date
317e3c44bf Update CHANGELOG.md 2021-10-22 11:10:42 -07:00
61b90251af Update IXWebSocketVersion.h 2021-10-22 11:09:12 -07:00
851157f252 update api call 2021-10-22 10:59:51 -07:00
69541cf750 define macro for mbedtls >= 3 2021-10-22 10:58:56 -07:00
1e166eee57 cmake change find header file 2021-10-22 10:57:51 -07:00
6860b2d09d 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
2021-10-22 10:22:57 -07:00
3 changed files with 2 additions and 17 deletions

View File

@ -278,17 +278,4 @@ namespace ix
#endif
}
// Convert network bytes to host bytes. Copied from the ASIO library
unsigned short network_to_host_short(unsigned short value)
{
#if defined(_WIN32)
unsigned char* value_p = reinterpret_cast<unsigned char*>(&value);
unsigned short result = (static_cast<unsigned short>(value_p[0]) << 8)
| static_cast<unsigned short>(value_p[1]);
return result;
#else // defined(_WIN32)
return ntohs(value);
#endif // defined(_WIN32)
}
} // namespace ix

View File

@ -81,6 +81,4 @@ namespace ix
const char* inet_ntop(int af, const void* src, char* dst, socklen_t size);
int inet_pton(int af, const char* src, void* dst);
unsigned short network_to_host_short(unsigned short value);
} // namespace ix

View File

@ -351,7 +351,7 @@ namespace ix
continue;
}
remotePort = ix::network_to_host_short(client.sin_port);
remotePort = client.sin_port;
remoteIp = remoteIp4;
}
else // AF_INET6
@ -371,7 +371,7 @@ namespace ix
continue;
}
remotePort = ix::network_to_host_short(client.sin_port);
remotePort = client.sin_port;
remoteIp = remoteIp6;
}