The net_write function writes a specified number of bytes to a specified socket from a specified buffer.
int net_write(SYS_NETFD sd, char *buf, int sz);
The number of bytes written, which may 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;