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
This commit is contained in:
Enzo
2021-10-22 19:23:43 +02:00
committed by GitHub
parent 9bbd1f1b30
commit 3f1fc6906c
3 changed files with 17 additions and 2 deletions

View File

@ -81,4 +81,6 @@ 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