Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: need help with shell extensions tutorial Pin
Brakanjan7-Oct-02 6:57
Brakanjan7-Oct-02 6:57 
QuestionHow do i format a number with digit grouping? Pin
Redeemer-dk7-Oct-02 6:17
Redeemer-dk7-Oct-02 6:17 
AnswerRe: How do i format a number with digit grouping? Pin
Chris Richardson7-Oct-02 6:44
Chris Richardson7-Oct-02 6:44 
GeneralCTreeCtrl trouble Pin
google_4477-Oct-02 5:56
sussgoogle_4477-Oct-02 5:56 
GeneralRe: CTreeCtrl trouble Pin
Ravi Bhavnani7-Oct-02 6:18
professionalRavi Bhavnani7-Oct-02 6:18 
GeneralGrid will not scroll Pin
Shay Harel7-Oct-02 5:46
Shay Harel7-Oct-02 5:46 
GeneralProblems with ranges in Excel Pin
Anonymous7-Oct-02 5:37
Anonymous7-Oct-02 5:37 
GeneralMFC Sockets design question Pin
User 66587-Oct-02 5:32
User 66587-Oct-02 5:32 
Hi
currently I'm developing an app that queries a lot of game servers at a time using UDP. I have a list of about 1000 servers and want to get their information, that's why I need to call SendTo() for every server. If I receive an answer from the server I want to add all necessary information into a CListCtrl.

What's the fastest and safest way to do that? Furthermore I want to set a timeout value (say 1500ms). If the server doesn't answer in that time I want to skip the request and go on with the next server. Currently my code is very crappy and doesn't work very well, i.e. is crashes after about 20 servers (I do not use threads). Roll eyes | :rolleyes:
I want it that way:
for(int i=0; i<ServerCount; i++)
{
    socket.SendTo(...);
    (...wait 1500msec for answer)
    (next server...)
}


I have overridden my own CSocket so that a member function OnReceiveUDP is called whenever there is data that can be received.

Any suggestions? Smile | :)

Thanks in advance
Greg

modified 12-Sep-18 21:01pm.

GeneralW2K vs Win9X child window creation w/ menu Pin
Tony Teveris7-Oct-02 4:48
Tony Teveris7-Oct-02 4:48 
Generalprocess handle to window HWND Pin
Liorsh7-Oct-02 4:34
Liorsh7-Oct-02 4:34 
GeneralRe: process handle to window HWND Pin
Iain Clarke, Warrior Programmer7-Oct-02 5:35
Iain Clarke, Warrior Programmer7-Oct-02 5:35 
GeneralAdding streams and files into MSWord compound file Pin
Mariusz Popiolek7-Oct-02 4:19
sussMariusz Popiolek7-Oct-02 4:19 
QuestionHDROP??? Pin
Nitron7-Oct-02 4:19
Nitron7-Oct-02 4:19 
AnswerRe: HDROP??? Pin
jmkhael7-Oct-02 4:26
jmkhael7-Oct-02 4:26 
AnswerRe: HDROP??? Pin
Michael Dunn7-Oct-02 4:28
sitebuilderMichael Dunn7-Oct-02 4:28 
AnswerRe: HDROP??? Pin
Ravi Bhavnani7-Oct-02 4:34
professionalRavi Bhavnani7-Oct-02 4:34 
AnswerThanx! Pin
Nitron7-Oct-02 4:37
Nitron7-Oct-02 4:37 
Generalstatic function question Pin
ns7-Oct-02 3:39
ns7-Oct-02 3:39 
GeneralRe: static function question Pin
Chris Losinger7-Oct-02 3:39
professionalChris Losinger7-Oct-02 3:39 
Generalanother static member question Pin
ns7-Oct-02 3:45
ns7-Oct-02 3:45 
GeneralRe: another static member question Pin
Ravi Bhavnani7-Oct-02 4:32
professionalRavi Bhavnani7-Oct-02 4:32 
QuestionPowerPoint 2002 Automation, anyone tried ? Pin
Braulio Dez7-Oct-02 3:14
Braulio Dez7-Oct-02 3:14 
AnswerRe: PowerPoint 2002 Automation, anyone tried ? Pin
jmkhael7-Oct-02 5:18
jmkhael7-Oct-02 5:18 
GeneralRe: PowerPoint 2002 Automation, anyone tried ? Pin
Braulio Dez7-Oct-02 5:50
Braulio Dez7-Oct-02 5:50 
Questionhow to simulate the terrians? Pin
wangnanjing7-Oct-02 3:16
wangnanjing7-Oct-02 3:16 

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.