|
The problem is most likely at the server end. Does the server continue to listen for connections after the first connection?
Exaclty what winsock error number do you get at the client when you try to connect the second time?
Can you debug the server and see whats going on?
|
|
|
|
|
Hi josh,
thanks for the reply.. The server continues to listen for the message..
there is no error message coming at the client side.
thanks
john davis
|
|
|
|
|
the second time the client connect to server, is the connection established all right?
|
|
|
|
|
hi lucy,
it is connected without any problem. but data is not send.
thanks & regards
john davis
|
|
|
|
|
HTH:
// disable the Nagle algorithm for send coalescing
// so the short packet will be sent immediately
bool opt = 1;
if ( NO_ERROR != setsockopt(m_sdIp, IPPROTO_TCP, TCP_NODELAY,
(char *)&opt, sizeof(opt)) )
{
bWarning = true;
strWarning += _T("Set TCP_NODELAY failed.\n");
}
|
|
|
|
|
Is there any shorter way to bring back missing classview?
My entire ERP projects classview is missing. I am Keeping this problem on forum for fourth time please help.
|| ART OF LIVING ||
|
|
|
|
|
Not yet back?
Did you try deleting .ncb and .clw files??
|
|
|
|
|
Do you enjoy troubling people?
|| ART OF LIVING ||
|
|
|
|
|
No, my friend.....
I dont think anybody here does that...
I just wanted to help you..the same answer i gave for your previous post also..
I wanted to know the result....
|
|
|
|
|
In my backup copy when i implemented ur suggestion my classwizard diappeared and after rebuilding also nothing improved
|| ART OF LIVING ||
-- modified at 3:18 Friday 11th November, 2005
|
|
|
|
|
Yes..that is true..
But IDE will prompt you to create classwizard from the existing files...
|
|
|
|
|
Hi,
I am planning to take VC++ certifications that could add weight to my Resume. Not the free ones like Brain Bench certifications. Should be authentic and has to be taken from recognised promatic center. Has Microsoft have any plans to re-start VC++ certifications??
Please Help...
Nani
|
|
|
|
|
mandanani wrote: Has Microsoft have any plans to re-start VC++ certifications??
vc++ exams are already obselete.. now you can prepare for .net exams/certification
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi all,
I need to select items in a tree with Ctrl and other keys
like ctrl+up arrow , ctrl+down arrow for traversing through the items and on on pressing ctrl+spacebar the item shud get selected.
I want to know when the setfocus() is called
when pressing ctrl+VK_UP
|
|
|
|
|
I have a socket server that is to establish a connection with only one client. I can accept the client fine and also receive the data from the client. My problem is that every time I want to reconnect to the server, I get a error message.
Debug Assertion Failed!<br />
<br />
Program: D:\TempProject\Debug\TempPrj.exe<br />
File: sockcore.cpp<br />
Line: 177
When I try and debug it says an unexpected breakpoint has been reached....
What does I have to do when the client disconnects? How do I get the server to come back up in the Listen() state again?
Thanks for helping a noob out.
|
|
|
|
|
NYTSX wrote: My problem is that every time I want to reconnect to the server, I get a error message.
I believe you are accepting the New Socket Connection on same variable without properly closing it...
First make a call to Close().. before acception new connection!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I do call Close() when the disconnect button is pressed. At that point I also do a Listen() which I figured would allow for the next client to connect to the server?
Any more suggestions? Would this be sufficient to have the server always be ready to accept a connection when one is not already established?
|
|
|
|
|
Hi,
I have this code to draw a progress bar at run time, but I dont' want the user to resize it. So is there any way by which I could restrict the user from resizing it.
CProgressCtrl m_ProgressBar;
m_ProgressBar.Create(WS_CHILD|WS_VISIBLE|WS_THICKFRAME ,
CRect(10,rectWnd.top + headerHeight+55,window.Width()-2*10,20),
(CWnd *)this, IDC_PROGRESSBAR);
I think will have to add some WS_ option but don't know exactly.
Thanks,
PJ
|
|
|
|
|
Unless I'm missing something here, controls are not normally resizeable at runtime.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
But I draw other controls like button, edit box, group box, They are not resizable..
Thanks,
|
|
|
|
|
PrashantJ wrote: But I draw other controls like button, edit box, group box, They are not resizable..
My point exactly.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Remove the WS_THICKFRAME style.
Good luck.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
No that didn't work
|
|
|
|
|
On the surface it doesn't make sense, but I recall 'PJ Arends' mentioned something about it in one of his articles, and now I see something similar to it in another article, which is causing me to try and remember the real reason behind its use.
Here's the code.
BOOL CALLBACK CMyApp::searcher(HWND hWnd, LPARAM lParam)
{
DWORD result;
LRESULT ok = ::SendMessageTimeout(hWnd,
UWM_ARE_YOU_ME,
0, 0,
SMTO_BLOCK |
SMTO_ABORT_IF_HUNG,
200,
&result);
if(ok == 0)
return TRUE;
if(result == UWM_ARE_YOU_ME)
{
HWND* target = (HWND*)lParam;
*target = hWnd;
return FALSE;
}
return TRUE;
}
Is there a reason for the reassigning of a value to the same variable in this manner?
William
Fortes in fide et opere!
|
|
|
|
|
You might want to pose this question to Dr. Newcomer.
The only other thing that I can offer is that:
HWND *target = (HWND *) lParam; equates to:
HWND *target;
target = (HWND *) lParam; which is different than:
*target = hWnd;
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|