中国开发网: 论坛: 程序员情感CBD: 贴子 487662
Slash: 那个nSendSize是传输块的大小,不是你理解的传输大小
nSendSize
The size, in bytes, of the data block used in the send operation. Set nSendSize to zero to let the sockets layer select a default send size.
Setting nSendSize to 0xFFFFFFF enables the caller to control the size and content of each send request, achieved by using the TP_ELEMENT_EOP flag in the TRANSMIT_PACKETS_ELEMENT array pointed to in the lpPacketArray parameter. This capability is useful for message protocols that place limitations on the size of individual send requests.


至于lpOverlapped为啥是NULL,是因为没有用到重叠IO

lpOverlapped
A pointer to an OVERLAPPED structure. If the socket handle specified in the hSocket parameter has been opened as overlapped, use this parameter to achieve asynchronous (overlapped) I/O operation. Socket handles are opened as overlapped by default.

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录