Re: reading async from socket
- From: "Dilip" <rdilipk@xxxxxxxxx>
- Date: 6 Jul 2006 06:11:15 -0700
Alexander
Alexander Nickolov wrote:
WinSock directly supports IOCP model. You use WSARead,
not ReadFile, however. Still, for a client it usually doesn't
make sense going for a server I/O model. You may want to
check out asynchonous socket I/O via WSAAsyncSelect if
you have a GUI application.
thanks for your reply. A few quick questions:
Does using WSARecv means opening the socket using WSASocket with that
overlapped I/O option set? The reason I am asking is the current code
uses plain old socket call to create a socket, which I believe is not
tailor made to use with WSARecv.
So.. what is the best approach for reading enormous amount of data from
a client application, if you need the same kind of performance that you
normally expect from a server app? IOW, my client app needs to
efficiently read the data from the socket and must also be able to
process the response in parallel (when I say 'in parallel' I simply
mean it in the loose sense of the term, like doing it in another
thread). Thats why I wondered whether I should do some kind of async
I/O on the socket and use QueueUserWorkItem subsequently to process the
assembled response packet.
My app is not a GUI app. Its going to run as a NT Service in the end
but for the moment its being built as a plain old console app.
.
- Follow-Ups:
- Re: reading async from socket
- From: Alexander Nickolov
- Re: reading async from socket
- References:
- reading async from socket
- From: Dilip
- Re: reading async from socket
- From: Alexander Nickolov
- reading async from socket
- Prev by Date: "active" IP address
- Next by Date: IOCP issue
- Previous by thread: Re: reading async from socket
- Next by thread: Re: reading async from socket
- Index(es):
Relevant Pages
|