Click here to Skip to main content
16,013,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAsync Socket Pin
Shay Harel27-Mar-08 9:02
Shay Harel27-Mar-08 9:02 
GeneralRe: Async Socket Pin
led mike27-Mar-08 10:37
led mike27-Mar-08 10:37 
GeneralRe: Async Socket Pin
Shay Harel27-Mar-08 11:15
Shay Harel27-Mar-08 11:15 
GeneralRe: Async Socket Pin
led mike27-Mar-08 11:27
led mike27-Mar-08 11:27 
GeneralRe: Async Socket Pin
Mark Salsbery27-Mar-08 13:39
Mark Salsbery27-Mar-08 13:39 
GeneralRe: Async Socket Pin
Shay Harel28-Mar-08 2:41
Shay Harel28-Mar-08 2:41 
GeneralRe: Async Socket Pin
Mark Salsbery28-Mar-08 6:28
Mark Salsbery28-Mar-08 6:28 
GeneralRe: Async Socket Pin
Moak27-Mar-08 14:05
Moak27-Mar-08 14:05 
Hi, it looks like you want to turn an asynchronous process into a synchronous process. I wonder why you decided to use CAsyncSocket in the beginning but I could suggest two designs:

If you can influence the API then I would change it, instead of calling blocking the API call could accept a window message (or another type of notification) and when the request has completed it will signal that the data is available.

If you can't change the API or it would be too costly then there is my sugestion number two which is to wrap this mechanism internally into a worker thread... or simply to implement it with blocking sockets. Smile | :)

Since you mentioned your application is a GUI and I assume it is event driven, perhaps the first alternative is the best.

Hope it helps!

Moak


GeneralRe: Async Socket Pin
Naveen27-Mar-08 16:38
Naveen27-Mar-08 16:38 
QuestionHow to capture a scrollable web page as an image file ? Pin
Atom27-Mar-08 8:56
Atom27-Mar-08 8:56 
AnswerRe: How to capture a scrollable web page as an image file ? Pin
ThatsAlok27-Mar-08 21:58
ThatsAlok27-Mar-08 21:58 
QuestionReading a USB device Pin
koumodaki27-Mar-08 6:14
koumodaki27-Mar-08 6:14 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 8:05
David Crow27-Mar-08 8:05 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 8:11
koumodaki27-Mar-08 8:11 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 8:16
David Crow27-Mar-08 8:16 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 8:25
koumodaki27-Mar-08 8:25 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 8:34
David Crow27-Mar-08 8:34 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:13
koumodaki27-Mar-08 9:13 
QuestionRe: Reading a USB device Pin
David Crow27-Mar-08 9:17
David Crow27-Mar-08 9:17 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:20
koumodaki27-Mar-08 9:20 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:31
koumodaki27-Mar-08 9:31 
GeneralRe: Reading a USB device Pin
David Crow27-Mar-08 9:34
David Crow27-Mar-08 9:34 
QuestionRe: Reading a USB device Pin
koumodaki27-Mar-08 9:40
koumodaki27-Mar-08 9:40 
GeneralRe: Reading a USB device Pin
JudyL_MD27-Mar-08 9:31
JudyL_MD27-Mar-08 9:31 
GeneralRe: Reading a USB device Pin
koumodaki27-Mar-08 9:41
koumodaki27-Mar-08 9:41 

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.