htonl function converts a u_long from host to TCP/IP network byte order (which is big-endian).
Shortcut for Host TO Network translation
The htonl function can be used to convert an IPv4 address in host byte order to the IPv4 address in network byte order.
Docs: https://msdn.microsoft.com/en-us/library/windows/desktop/ms738556(v=vs.85).aspx