Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
johtib4-Apr-05 23:23
johtib4-Apr-05 23:23 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
Blake Miller6-Apr-05 5:09
Blake Miller6-Apr-05 5:09 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
johtib8-Apr-05 21:46
johtib8-Apr-05 21:46 
I've been trying to find a way to wait for multiple events, both timer and network events at the same time. It looks like I would need a function that does the job as WaitForMultipleObjects and WSAWaitForMultipleEvents at the same time. Or is it possible to use the WSAEVENTs with WaitForMultipleObjects?

I'm not 100% sure that I understood the bit about missing events. If I've understood it correctly events are signaled via flags and you can wait for these flags to be signaled via, for example, WaitForMultipleObjects.

If the timer expires it should set its flag and if I do:

loop {
  e = select_event_from_all_signaled_events()
  // handle e
}


I would eventually see that the timer event was signaled (I might catch it later than I intended but it shouldn't be lost). I only need to receive timer events every 15 seconds or so and precision is not important (if it differed by 2 second it would still be no problem).
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
Blake Miller11-Apr-05 5:20
Blake Miller11-Apr-05 5:20 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
johtib11-Apr-05 6:39
johtib11-Apr-05 6:39 
GeneralRe: How to avoid using multiple threads in winsock programming? Pin
Blake Miller11-Apr-05 12:29
Blake Miller11-Apr-05 12:29 
Questiondraw on ToolBar Button??? Pin
Anything.J24-Mar-05 22:01
Anything.J24-Mar-05 22:01 
QuestionHow many of you use _tcsinc ? Pin
Chintoo72324-Mar-05 20:55
Chintoo72324-Mar-05 20:55 
AnswerRe: How many of you use _tcsinc ? Pin
toxcct24-Mar-05 21:17
toxcct24-Mar-05 21:17 
GeneralRe: How many of you use _tcsinc ? Pin
Chintoo72324-Mar-05 22:07
Chintoo72324-Mar-05 22:07 
GeneralRe: How many of you use _tcsinc ? Pin
toxcct24-Mar-05 22:16
toxcct24-Mar-05 22:16 
AnswerRe: How many of you use _tcsinc ? Pin
PJ Arends24-Mar-05 22:08
professionalPJ Arends24-Mar-05 22:08 
GeneralRe: How many of you use _tcsinc ? Pin
Chintoo72325-Mar-05 1:05
Chintoo72325-Mar-05 1:05 
AnswerRe: How many of you use _tcsinc ? Pin
Chintoo72325-Mar-05 1:20
Chintoo72325-Mar-05 1:20 
GeneralRe: How many of you use _tcsinc ? Pin
Blake Miller25-Mar-05 6:56
Blake Miller25-Mar-05 6:56 
AnswerRe: How many of you use _tcsinc ? Pin
David Crow25-Mar-05 3:35
David Crow25-Mar-05 3:35 
GeneralRe: How many of you use _tcsinc ? Pin
Chintoo72325-Mar-05 5:07
Chintoo72325-Mar-05 5:07 
AnswerRe: How many of you use _tcsinc ? Pin
Blake Miller25-Mar-05 6:47
Blake Miller25-Mar-05 6:47 
AnswerRe: How many of you use _tcsinc ? Pin
Michael Dunn25-Mar-05 6:49
sitebuilderMichael Dunn25-Mar-05 6:49 
AnswerRe: How many of you use _tcsinc ? Pin
cmk25-Mar-05 9:26
cmk25-Mar-05 9:26 
QuestionHow messages be dispatched? Pin
kokehqyu24-Mar-05 20:38
kokehqyu24-Mar-05 20:38 
QuestionCustom ActiveX control? Pin
foxyspy24-Mar-05 20:24
foxyspy24-Mar-05 20:24 
GeneralCapturing KeyUp and Setting Value ... Pin
Mitch F.24-Mar-05 20:19
Mitch F.24-Mar-05 20:19 
GeneralRe: Capturing KeyUp and Setting Value ... Pin
Anthony_Yio25-Mar-05 18:58
Anthony_Yio25-Mar-05 18:58 
GeneralDetermining if a character can be rendered in a certain font Pin
Taka Muraoka24-Mar-05 20:18
Taka Muraoka24-Mar-05 20:18 

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.