Denis Vlasenko wrote: >> Just a minor detail, but wouldn't it be better to use >> sizeof server_addr rather than 4? > > Hmm, I'm pretty sure that ipv4 address is a 4 byte value. That's correct, > It's other way around: sizeof server_addr _must_ be 4. but that isn't always correct. example: machines with CHAR_BIT == 16. Dirk