Click here to Skip to main content
15,893,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
led mike20-Jun-07 8:43
led mike20-Jun-07 8:43 
AnswerRe: CSocket stoping in PumpMessage (please help) Pin
tomitron20-Jun-07 5:44
tomitron20-Jun-07 5:44 
AnswerRe: CSocket stoping in PumpMessage (please help) Pin
tomitron21-Jun-07 1:38
tomitron21-Jun-07 1:38 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
tomitron21-Jun-07 1:41
tomitron21-Jun-07 1:41 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz21-Jun-07 3:38
Roger Stoltz21-Jun-07 3:38 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
tomitron21-Jun-07 5:33
tomitron21-Jun-07 5:33 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz22-Jun-07 1:05
Roger Stoltz22-Jun-07 1:05 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Mike O'Neill6-Jul-07 14:07
Mike O'Neill6-Jul-07 14:07 
You might have solved your problem by now, but one other reason that CSocket sometimes appears to "freeze" is that another one of the "golden rules" of sockets is broken: Don't call Receive() multiple times inside of OnReceive(). The correct code will make exactly one single call to Receive() inside OnReceive().

MSDN advises that multiple calls to Receive() can cause the application to freeze.

The same rule applies to CAsyncSocket() too.

See "Mfcsocs.exe sample demonstrates how to communicate in a TCP connection in Visual C++" at http://support.microsoft.com/kb/185728[^], which talks about a situation in which there are no more FD_READs. The simple little word about the application "hanging" is so important that it should be in large red bold letters, but it's not.

Mike
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
tomitron6-Jul-07 14:52
tomitron6-Jul-07 14:52 
QuestionProblem with Xp Styles Pin
TobetheWinner20-Jun-07 1:55
TobetheWinner20-Jun-07 1:55 
AnswerRe: Problem with Xp Styles Pin
toxcct20-Jun-07 1:57
toxcct20-Jun-07 1:57 
QuestionRe: Problem with Xp Styles Pin
TobetheWinner20-Jun-07 8:09
TobetheWinner20-Jun-07 8:09 
AnswerRe: Problem with Xp Styles Pin
Hamid_RT20-Jun-07 9:19
Hamid_RT20-Jun-07 9:19 
QuestionManifest and Exp Pin
tom groezer20-Jun-07 1:36
tom groezer20-Jun-07 1:36 
AnswerRe: Manifest and Exp Pin
toxcct20-Jun-07 1:45
toxcct20-Jun-07 1:45 
GeneralRe: Manifest and Exp Pin
tom groezer20-Jun-07 1:57
tom groezer20-Jun-07 1:57 
GeneralRe: Manifest and Exp Pin
toxcct20-Jun-07 2:00
toxcct20-Jun-07 2:00 
GeneralRe: Manifest and Exp Pin
Hans Dietrich20-Jun-07 3:12
mentorHans Dietrich20-Jun-07 3:12 
GeneralRe: Manifest and Exp Pin
Hamid_RT20-Jun-07 9:20
Hamid_RT20-Jun-07 9:20 
QuestionDelay in Image Transfer trough media player encoder! Pin
Naveen Khanna20-Jun-07 1:34
Naveen Khanna20-Jun-07 1:34 
AnswerRe: Delay in Image Transfer trough media player encoder! Pin
rjkg20-Jun-07 2:12
rjkg20-Jun-07 2:12 
GeneralRe: Delay in Image Transfer trough media player encoder! Pin
Naveen Khanna20-Jun-07 18:49
Naveen Khanna20-Jun-07 18:49 
AnswerRe: Delay in Image Transfer trough media player encoder! Pin
Mark Salsbery20-Jun-07 5:58
Mark Salsbery20-Jun-07 5:58 
GeneralRe: Delay in Image Transfer trough media player encoder! Pin
Naveen Khanna20-Jun-07 18:55
Naveen Khanna20-Jun-07 18:55 
GeneralRe: Delay in Image Transfer trough media player encoder! Pin
Mark Salsbery21-Jun-07 5:28
Mark Salsbery21-Jun-07 5:28 

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.