Byte Ordering Assumptions

A service provider should treat all sockaddr components exclusive of the address family field as if they are in the network byte order, and the address family field as in the local machine's byte order. It is the Windows Sockets application's responsibility to make sure that addresses contained in sockaddr structs are properly arranged. The Windows Sockets API provides a number of conversion routines to simplify this task. Currently these routines understand conversion between the local host's natural byte order and either "big-endian" or "little-endian" network byte ordering. Windows Sockets's architecture is such that other byte ordering schemes could be introduced in the future.