Part of the program is as follows:
Each time the sender to send the file data as a structure, consists of three parts, the first is the file (unsigned integer), the total length of the second is the data packet length, the third is to store the data character array (length of 50000),
The question now is, if you do not use thread. Sleep, parsing out the second will be a particularly large number, lead to carry out circulation, and other data is no problem,
O great god teach