Click here to Skip to main content
16,012,821 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
_AnsHUMAN_ 29-May-07 3:45
_AnsHUMAN_ 29-May-07 3:45 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
Hamid_RT29-May-07 0:29
Hamid_RT29-May-07 0:29 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
Roger Stoltz29-May-07 1:35
Roger Stoltz29-May-07 1:35 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
SandipG 29-May-07 2:16
SandipG 29-May-07 2:16 
AnswerRe: How to avoid Esc and Enter Key for Closing Dialog Box Pin
David Crow29-May-07 3:56
David Crow29-May-07 3:56 
QuestionStrange socket problem Pin
BadKarma28-May-07 23:57
BadKarma28-May-07 23:57 
AnswerRe: Strange socket problem Pin
Roger Stoltz29-May-07 3:02
Roger Stoltz29-May-07 3:02 
GeneralRe: Strange socket problem Pin
BadKarma29-May-07 4:06
BadKarma29-May-07 4:06 
Thanks for the response.

Roger Stoltz wrote:
You call Accept() on the listening socket instance and provides a reference to the new socket as argument, right?

Yes, I do it like you mentioned.
CClientSocket* pNewSocket = new CClientSocket(this);	
if(!pNewSocket)
{
	//
	//	Error trying to create a client socket
	//
	WriteError(ecNotEnoughMemory, "cannot_create_new_socket", "AcceptNewClient");
	return;
}

if(m_pListenSocket->Accept(*pNewSocket))
{
	...
}

This code is called when I fall in the OnAccept from the Listen socket. The problem is that i don't fall in the function anymore. But if I check the Socket is still (with other tools) listening and even puts incoming request in the pending queue. And indeed after 5 clients trying to connect (they hang) the sixth client gets a connection refused.

Could it be that the message handling pump is 'broken'. And if so can i check for it in order to make a new listensocket?

Yes it's a multithreaded application (about 13 threads)



codito ergo sum

GeneralRe: Strange socket problem Pin
Roger Stoltz29-May-07 4:18
Roger Stoltz29-May-07 4:18 
GeneralRe: Strange socket problem Pin
BadKarma29-May-07 4:57
BadKarma29-May-07 4:57 
GeneralRe: Strange socket problem Pin
Roger Stoltz29-May-07 5:34
Roger Stoltz29-May-07 5:34 
GeneralRe: Strange socket problem Pin
Moak28-Jun-07 5:52
Moak28-Jun-07 5:52 
Question#$%%^^% EVC++! - why bitmap won't save? Pin
charlieg28-May-07 23:56
charlieg28-May-07 23:56 
AnswerRe: #$%%^^% EVC++! - why bitmap won't save? Pin
Nelek29-May-07 1:28
protectorNelek29-May-07 1:28 
QuestionWhy dialog doesn't repond to tab key Pin
LiYS28-May-07 23:38
LiYS28-May-07 23:38 
AnswerRe: Why dialog doesn't repond to tab key Pin
nitin328-May-07 23:46
nitin328-May-07 23:46 
AnswerRe: Why dialog doesn't repond to tab key Pin
Hamid_RT29-May-07 0:08
Hamid_RT29-May-07 0:08 
GeneralRe: Why dialog doesn't repond to tab key Pin
Rajesh R Subramanian29-May-07 4:01
professionalRajesh R Subramanian29-May-07 4:01 
Questionmemory heap problem Pin
Moonis Ahmed28-May-07 23:27
Moonis Ahmed28-May-07 23:27 
AnswerRe: memory heap problem Pin
Roger Stoltz28-May-07 23:40
Roger Stoltz28-May-07 23:40 
AnswerRe: memory heap problem Pin
Matthew Faithfull28-May-07 23:48
Matthew Faithfull28-May-07 23:48 
AnswerRe: memory heap problem Pin
Stephen Hewitt29-May-07 14:01
Stephen Hewitt29-May-07 14:01 
Questionvideo streaming Pin
tyagineha28-May-07 23:13
tyagineha28-May-07 23:13 
AnswerRe: video streaming Pin
Roger Stoltz28-May-07 23:34
Roger Stoltz28-May-07 23:34 
AnswerRe: video streaming [modified] Pin
Amar Sutar28-May-07 23:55
Amar Sutar28-May-07 23:55 

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.