int net_write(SYS_NETFD sd, char *buf, int sz);
The number of bytes written, which might be less than the requested size if an error occurs.
SYS_NETFD sd is the platform-independent socket descriptor.
char *buf is the buffer containing the bytes.
int sz is the number of bytes to write.
if (net_write(sn->csd, FIRSTMSG, strlen(FIRSTMSG)) == IO_ERROR) return REQ_EXIT;