ntohs function winsock
Converts a u_short from TCP/IP network byte order to host byte order, which is little-endian on Intel processors.
To learn more, see learn.microsoft.com/windows/win32/api/winsock/nf-winsock-ntohs.
Implementation
Win32Result<int> ntohs(int netshort) {
final result_ = ntohs_Wrapper(netshort);
return Win32Result(value: result_.value.u16, error: result_.error);
}