The following summarizes the online harvesting:
In the case of TCP communication, the host byte order and network byte conversions are required. But if the data I want to send is the call to the ReadFile () function to read from the file, that is, the data that is read is saved to the char[] array, will I need to convert the byte order when I send it with the Send function?
--if it's just a byte stream, no conversion is required. Generally is the IP address, port number, the transmission of some integer parameters, only need to do the conversion, the byte stream does not need. If the head records the size, then this record size of the integer number needs to be converted;
--The number types of protocol parsing need to be converted, and the load byte stream does not need to be concerned;
--the data that needs to be made known to the network needs to be converted, such as IP, port number. and the actual data sent, there is no conversion requirements. The data read from the file is your own data, the data will not be converted to look at yourself, anyway, what it is to send out what it looks like.
Socket small End Conversion summary (temporary extraction, post-repair original code)