Re: Did WSASend always returned SOCKET_ERROR and error code is WSA_IO_PENDING .. ??
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Thu, 7 Sep 2006 16:56:47 +0300
Even for non-overlapped operations successful return value of send bytes
mean that those bytes move to kernel socket and not yet really send. You
never know if data really send. The only correct way is to receive reply
from peer host about that
Arkady
"madmanahong" <madmanahong@xxxxxxx> wrote in message
news:1157627244.668853.131290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Arkady Frenkel ??:
That usual but not always behavior.
From MSDN :
Overlapped Socket I/O
If an overlapped operation completes immediately, WSASend returns a value
of
zero and the lpNumberOfBytesSent parameter is updated with the number of
bytes sent. If the overlapped operation is successfully initiated and will
complete later, WSASend returns SOCKET_ERROR and indicates error code
WSA_IO_PENDING.
forget to say, I set the SO_SNDBUF zero.
so that, always return WSA_IO_PENDING.
I guess, although WSASend returns zero, the operation doesn't completes
immediately. instead WSASend copy the buffer in SOCKET buffer.
so if you se SO_SNDBUF zero, WSASend should always returns
WSA_IO_PENDING..
hehe ~:)
.
- References:
- Did WSASend always returned SOCKET_ERROR and error code is WSA_IO_PENDING .. ??
- From: madmanahong
- Re: Did WSASend always returned SOCKET_ERROR and error code is WSA_IO_PENDING .. ??
- From: Arkady Frenkel
- Re: Did WSASend always returned SOCKET_ERROR and error code is WSA_IO_PENDING .. ??
- From: madmanahong
- Did WSASend always returned SOCKET_ERROR and error code is WSA_IO_PENDING .. ??
- Prev by Date: Re: wi-fi detection
- Next by Date: Re: OVERLAPPED members avalible for application
- Previous by thread: Re: Did WSASend always returned SOCKET_ERROR and error code is WSA_IO_PENDING .. ??
- Next by thread: WSASend returns SOCKET_ERROR but data is sent and bytesSend is updated
- Index(es):
Relevant Pages
|