(strictly it calls exit on anything going wrong, but as the whole problem with rpc is the extra failure modes that's not compelling)
"...so you can appreciate the libraries that do it for you "And now it seems most CPUs are little endian anyway, so why do this conversion anymore to “network order” if you are designing a new protocol?
Also, I don't know if this is apocryphal, but as a wee lad I was told the tale that network routers worked faster because they could do coarse addressing faster thanks to seeing IPv4 addresses in big-endian, when the bytes trickled in one-by-one.