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