Click here to Skip to main content
12,501,683 members (59,905 online)

C / C++ / MFC

 
AnswerRe: CSocket stoping in PumpMessage (please help) Pin
Mike Dimmick20-Jun-07 3:44
memberMike Dimmick20-Jun-07 3:44 
AnswerRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz20-Jun-07 4:29
memberRoger Stoltz20-Jun-07 4:29 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
led mike20-Jun-07 5:28
mvpled mike20-Jun-07 5:28 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz20-Jun-07 6:21
memberRoger Stoltz20-Jun-07 6:21 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
led mike20-Jun-07 6:32
mvpled mike20-Jun-07 6:32 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz20-Jun-07 6:57
memberRoger Stoltz20-Jun-07 6:57 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
led mike20-Jun-07 8:43
mvpled mike20-Jun-07 8:43 
AnswerRe: CSocket stoping in PumpMessage (please help) Pin
tomitron20-Jun-07 5:44
membertomitron20-Jun-07 5:44 
AnswerRe: CSocket stoping in PumpMessage (please help) Pin
tomitron21-Jun-07 1:38
membertomitron21-Jun-07 1:38 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
tomitron21-Jun-07 1:41
membertomitron21-Jun-07 1:41 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz21-Jun-07 3:38
memberRoger Stoltz21-Jun-07 3:38 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
tomitron21-Jun-07 5:33
membertomitron21-Jun-07 5:33 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Roger Stoltz22-Jun-07 1:05
memberRoger Stoltz22-Jun-07 1:05 
GeneralRe: CSocket stoping in PumpMessage (please help) Pin
Mike O'Neill6-Jul-07 14:07
memberMike 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
membertomitron6-Jul-07 14:52 
QuestionProblem with Xp Styles Pin
TobetheWinner20-Jun-07 1:55
memberTobetheWinner20-Jun-07 1:55 
AnswerRe: Problem with Xp Styles Pin
toxcct20-Jun-07 1:57
mvptoxcct20-Jun-07 1:57 
QuestionRe: Problem with Xp Styles Pin
TobetheWinner20-Jun-07 8:09
memberTobetheWinner20-Jun-07 8:09 
AnswerRe: Problem with Xp Styles Pin
WhiteSky20-Jun-07 9:19
memberWhiteSky20-Jun-07 9:19 
QuestionManifest and Exp Pin
tom groezer20-Jun-07 1:36
membertom groezer20-Jun-07 1:36 
AnswerRe: Manifest and Exp Pin
toxcct20-Jun-07 1:45
mvptoxcct20-Jun-07 1:45 
GeneralRe: Manifest and Exp Pin
tom groezer20-Jun-07 1:57
membertom groezer20-Jun-07 1:57 
GeneralRe: Manifest and Exp Pin
toxcct20-Jun-07 2:00
mvptoxcct20-Jun-07 2:00 
GeneralRe: Manifest and Exp Pin
Hans Dietrich20-Jun-07 3:12
mvpHans Dietrich20-Jun-07 3:12 
GeneralRe: Manifest and Exp Pin
WhiteSky20-Jun-07 9:20
memberWhiteSky20-Jun-07 9:20 
QuestionDelay in Image Transfer trough media player encoder! Pin
Naveen Khanna20-Jun-07 1:34
memberNaveen Khanna20-Jun-07 1:34 
AnswerRe: Delay in Image Transfer trough media player encoder! Pin
rajeshgupta125320-Jun-07 2:12
memberrajeshgupta125320-Jun-07 2:12 
GeneralRe: Delay in Image Transfer trough media player encoder! Pin
Naveen Khanna20-Jun-07 18:49
memberNaveen Khanna20-Jun-07 18:49 
AnswerRe: Delay in Image Transfer trough media player encoder! Pin
Mark Salsbery20-Jun-07 5:58
memberMark Salsbery20-Jun-07 5:58 
GeneralRe: Delay in Image Transfer trough media player encoder! Pin
Naveen Khanna20-Jun-07 18:55
memberNaveen Khanna20-Jun-07 18:55 
GeneralRe: Delay in Image Transfer trough media player encoder! Pin
Mark Salsbery21-Jun-07 5:28
memberMark Salsbery21-Jun-07 5:28 
QuestionRedistributing Visual C++ Files Pin
Programm3r20-Jun-07 1:32
memberProgramm3r20-Jun-07 1:32 
AnswerRe: Redistributing Visual C++ Files Pin
Hans Dietrich20-Jun-07 3:15
mvpHans Dietrich20-Jun-07 3:15 
GeneralRe: Redistributing Visual C++ Files Pin
Programm3r20-Jun-07 3:37
memberProgramm3r20-Jun-07 3:37 
AnswerRe: Redistributing Visual C++ Files Pin
Mike Dimmick20-Jun-07 3:55
memberMike Dimmick20-Jun-07 3:55 
QuestionInterdependent classes in C++ Pin
boffboy20-Jun-07 1:12
memberboffboy20-Jun-07 1:12 
AnswerRe: Interdependent classes in C++ Pin
Cedric Moonen20-Jun-07 1:21
mvpCedric Moonen20-Jun-07 1:21 
GeneralRe: Interdependent classes in C++ Pin
tom groezer20-Jun-07 1:53
membertom groezer20-Jun-07 1:53 
GeneralRe: Interdependent classes in C++ Pin
toxcct20-Jun-07 1:56
mvptoxcct20-Jun-07 1:56 
GeneralRe: Interdependent classes in C++ Pin
Cedric Moonen20-Jun-07 2:01
mvpCedric Moonen20-Jun-07 2:01 
AnswerRe: Interdependent classes in C++ Pin
toxcct20-Jun-07 1:29
mvptoxcct20-Jun-07 1:29 
QuestionDirective Pin
tom groezer20-Jun-07 0:45
membertom groezer20-Jun-07 0:45 
AnswerRe: Directive Pin
Cedric Moonen20-Jun-07 0:58
mvpCedric Moonen20-Jun-07 0:58 
GeneralRe: Directive Pin
toxcct20-Jun-07 1:32
mvptoxcct20-Jun-07 1:32 
GeneralRe: Directive Pin
Cedric Moonen20-Jun-07 1:39
mvpCedric Moonen20-Jun-07 1:39 
GeneralRe: Directive Pin
tom groezer20-Jun-07 1:43
membertom groezer20-Jun-07 1:43 
GeneralRe: Directive Pin
toxcct20-Jun-07 1:51
mvptoxcct20-Jun-07 1:51 
QuestionRetriving Device information attached with system Pin
pan_angel20-Jun-07 0:38
memberpan_angel20-Jun-07 0:38 
QuestionRe: Retriving Device information attached with system Pin
DavidCrow20-Jun-07 2:35
mvpDavidCrow20-Jun-07 2:35 
QuestionRe: Retriving Device information attached with system Pin
WhiteSky20-Jun-07 9:13
memberWhiteSky20-Jun-07 9:13 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 25 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid