Thanks guys! This has been illuminating.
Type: Posts; User: Jupiter
Thanks guys! This has been illuminating.
Thanks guys! This is starting to make more and more sense! anduril462, to further elaborate on your example, after I write it out, how should I extract it?
char packet[10];
int x = 42; //...
I see. So how does one know if the data is not yet in network byte order?
Thanks for your replies! Sorry about the bad code examples. Those are typos. I was trying to whip up some quick samples highlighting my problem. My actual code is pretty bloated currently, and there...
Hi guys, I'm relatively new to C programming, and am having a hard time with the network byte order stuff. It seems like it should be simple, htons/htonl before writing, and ntohs/ntohl when reading....