normally, the functions used in network programming are
ssize_t read (int fd, void * buf, size_t nbyte)
ssize_t write (int fd, const void * buf, size_t nbytes)
to transmit byte by byte.
but usually, a word in Chinese accounts for 2 to 3 bytes, so garbled may occur in the process of transmission.
so I would like to ask, how should this problem be solved?