TransmitFile Function
最近在写个文件传输功能,由于是自己定义的协议,考虑在传输文件的时候,
最近在写个文件传输功能,由于是自己定义的协议,考虑在传输文件的时候,
先把文件分成很多段,然后在每一段前面加上 协议包头,
看到 TransmitFile 的优点这么多,于是想来试试,结果对一个参数误解:
lpTransmitBuffers
A pointer to a TRANSMIT_FILE_BUFFERS data structure that contains pointers to data to send before and after the file data is sent. This parameter should be set to a NULL pointer if you want to transmit only the file data.
这个参数,其实是在 整个文件 的前后加上标志,而不是在每段文件前后都加上标志。
MSDN得好好理解啊