Re: Question regarding completion routine on overlapped WSASend
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Mon, 13 Mar 2006 14:13:40 +0200
Due to my experience you can set Competion routine pointer to NULL, but
overlapped pointer have to be set for non-blocked sockets, otoh you can't
free ovelapped struct unless you'll receive in completion routine that
socket sent all data you specifed in WSASend
Arkady
"Mark" <Mark@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3EBA0266-F62D-49A2-A613-00A03CB5243E@xxxxxxxxxxxxxxxx
Hello all,
I have the following
void CALLBACK CompletionROUTINE(...) {
...
}
// send using overlapped blocking socket
WSASend(socket, pbuf, 1, &sent, flags,
lpOverlapped, CompletionROUTINE);
From experiment, I realize if WSASend returns 0
(completes immediately), then CompletionROUTINE
is not called, that's ok.
What I want to know is if indeed CompletionROUTINE
is called:
1. is the lpOverlapped parameter passed to the
completion routine the exact same address as the
one I passed to WSASend (in other words, can I new
a WSAOVERDLAPPE struct and pass it to WSASend,
and then delete it inside the completion routine??)
2. what if I pass 0 as lpOverlapped to WSASend,
what would be passed as lpOverlapped to
CompletionROUTINE()??
Thanks, I can't figure this out out of the help page
and appreciate an answer from anybody who has experience
in using overlapped sends.
.
- Prev by Date: Re: Howto get workgroup name
- Next by Date: Re: Layered Service Provider incompatibilities
- Previous by thread: Socket security question
- Next by thread: Microsoft TLS Solution>?
- Index(es):
Relevant Pages
|