If it is a short link, use socket_set_nonblock to set the socket link to non-blocking, and then execute socket_read in a loop. When the return value length is 0, jump out of the loop and the reception ends (this method may cause problems in some cases).
It is best to specify the data length on the server side so that there will be no errors.
If it is a short link, use socket_set_nonblock to set the socket link to non-blocking, and then execute socket_read in a loop. When the return value length is 0, jump out of the loop and the reception ends (this method may cause problems in some cases).
It is best to specify the data length on the server side so that there will be no errors.