Click here to Skip to main content
15,925,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRefer to the touchpad specifications... Pin
CPallini1-Jan-07 10:39
mveCPallini1-Jan-07 10:39 
AnswerRe: preassure meter Pin
Shouvik Das1-Jan-07 17:12
Shouvik Das1-Jan-07 17:12 
Questionprefix vs postfix Pin
swjam1-Jan-07 2:45
swjam1-Jan-07 2:45 
AnswerRe: prefix vs postfix Pin
Nemanja Trifunovic1-Jan-07 5:22
Nemanja Trifunovic1-Jan-07 5:22 
QuestionIOCP And WSANOBUFS Error Pin
Polity4h1-Jan-07 2:32
Polity4h1-Jan-07 2:32 
QuestionRe: IOCP And WSANOBUFS Error Pin
Mark Salsbery1-Jan-07 8:52
Mark Salsbery1-Jan-07 8:52 
AnswerRe: IOCP And WSANOBUFS Error Pin
Polity4h1-Jan-07 11:01
Polity4h1-Jan-07 11:01 
GeneralRe: IOCP And WSANOBUFS Error Pin
Mark Salsbery1-Jan-07 15:14
Mark Salsbery1-Jan-07 15:14 
This may or may not be the problem, but based on what I've seen it's the first thing that comes
to mind. I hope this helps a bit...

Unless you always keep enough receive buffers queued in your IOCP then the socket can receive
datagrams faster than you are pulling them out of its buffer.

If the socket is not "connected" (for UDP that just means all datagrams will be ignored except
from the "connected" address) then the socket's recv buffer gets filled with every UDP datagram it
sees on the network. You need to pull them out fast enough to keep enough buffer space for
receives.

One option is to use a connected socket to receive UDP datagrams on. The drawback is you'd need
400 sockets, or one for every session as you described.

Another option is to always have a pool of overlapped WSARecvFrom() calls pushed on the IOCP
stack so there will always be one available when a datagram is received. You could use the
FD_READ notification to help notify a thread that data has been received on the socket and make
sure there's a pending overlapped receive operation ready to accept the data.

Also make sure your IOCP is properly "tuned" with the right amount of threads in the pool to
most efficiently handle all the received datagrams.

These articles may be helpful too (you may have seen them already - I keep them bookmarked for
any IOCP troubles I encounter Smile | :) )...
Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports[^]
INFO: Design Issues When Using IOCP in a Winsock Server[^]
GeneralRe: IOCP And WSANOBUFS Error Pin
Polity4h2-Jan-07 0:27
Polity4h2-Jan-07 0:27 
GeneralRe: IOCP And WSANOBUFS Error Pin
Polity4h2-Jan-07 6:25
Polity4h2-Jan-07 6:25 
GeneralRe: IOCP And WSANOBUFS Error Pin
Mark Salsbery2-Jan-07 7:07
Mark Salsbery2-Jan-07 7:07 
GeneralRe: IOCP And WSANOBUFS Error Pin
Polity4h2-Jan-07 7:17
Polity4h2-Jan-07 7:17 
Questionconsole app in VS2003 Pin
swjam1-Jan-07 2:01
swjam1-Jan-07 2:01 
AnswerRe: console app in VS2003 Pin
Jonathan [Darka]1-Jan-07 2:16
professionalJonathan [Darka]1-Jan-07 2:16 
GeneralRe: console app in VS2003 Pin
swjam1-Jan-07 2:22
swjam1-Jan-07 2:22 
AnswerRe: console app in VS2003 Pin
Michael Dunn1-Jan-07 10:00
sitebuilderMichael Dunn1-Jan-07 10:00 
GeneralRe: console app in VS2003 Pin
swjam1-Jan-07 15:18
swjam1-Jan-07 15:18 
Questiondouble casting Pin
Hadi Dayvary1-Jan-07 1:43
professionalHadi Dayvary1-Jan-07 1:43 
AnswerRe: double casting Pin
Gary R. Wheeler1-Jan-07 4:33
Gary R. Wheeler1-Jan-07 4:33 
Question"friend" class question Pin
eli150219791-Jan-07 1:04
eli150219791-Jan-07 1:04 
AnswerRe: "friend" class question Pin
Polity4h1-Jan-07 4:10
Polity4h1-Jan-07 4:10 
QuestionData Exchange Pin
Shouvik Das1-Jan-07 0:16
Shouvik Das1-Jan-07 0:16 
AnswerRe: Data Exchange Pin
PJ Arends1-Jan-07 7:48
professionalPJ Arends1-Jan-07 7:48 
GeneralRe: Data Exchange Pin
Shouvik Das1-Jan-07 16:42
Shouvik Das1-Jan-07 16:42 
GeneralRe: Data Exchange Pin
Cristian Amarie2-Jan-07 3:58
Cristian Amarie2-Jan-07 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.