An IP address is not a long int – it’s 4 bytes. Doing something like this is bad:
sprintf(buf,”%ld.%ld.%ld.%ld”, (ip>>24) & 255, (ip>>16) & 255, (ip>> 8 ) & 255, ip & 255);
iOS and Mac developer
An IP address is not a long int – it’s 4 bytes. Doing something like this is bad: