flat assembler
Message board for the users of flat assembler.

Index > Windows > winsock.

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 28 Jul 2010, 17:00
i have a question, whats more efficient:

- queue multiple WSARecv overlapped operations
- queue WSARecv only upon receiving FD_READ event


i guess that second part.
i dont know if its worth effort.

first approach will use constant ammount of memory, more connections = more memory


second approach will require me to spin though several bilions of clients calling function on each of them.


perhaps window queue method would be better?
at least i wont have to call WSAEnumNetworkEvents, just loop through socket list to get pointer to my data...

i dont know.
Post 28 Jul 2010, 17:00
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 24 Nov 2010, 11:15
Use asynchronously posted WSARecv along with I/O completion ports and a thread pool (look at BindIoCompletionCallback). An I/O completion post will be equivalent to receiving an FD_READ event. There are plenty of examples on www.codeproject.com, though beware, some are subpar. You can also take a look at the win32 implementation of boost::asio, if you have the patience reading thru heavily templated code Wink
Post 24 Nov 2010, 11:15
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.