Thiago Dantas said:[...]
[...]>char msg[] = "Hello!\n";
send(socketDescriptor, msg, strlen(msg), 0);
Endianness doesn't really apply to chars.
Since you're not sending the terminating null character, how will the
receiver know where the string stops?
Perhaps by seeing the '\n'.
You wouldn't write the trailing '\0' to a text file; it's plausible
that you wouldn't want to write it to a socket either. But of course
it depends on the protocol.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"