MFC Socket programming problem

Reply

Join Date: Dec 2004
Posts: 5
Reputation: shahin is an unknown quantity at this point 
Solved Threads: 0
shahin shahin is offline Offline
Newbie Poster

MFC Socket programming problem

 
0
  #1
Feb 3rd, 2005
I have to apologize to the moderators that I was not sure where I should post my question. So if this is wrong fourm feel free to move it to a more suitable place, thank you.

First of all I like to thank everyone here for their help in last thread. My new question is this:

I have a client and server application. I run the client on my laptop and server in desktop. It is simply sending some data from server to client.

This is how I do my send:
pNBaseD->OutputToSocket( pDoc->NetOptionCurrent, pDoc->StaInfo, pDoc->PredStaInfoCurrent, pDoc->MeaAllRaw, m_NetCorr_iPRNArray, m_NetCorr_psNetCorr, m_NetCorr_psPredNetCorr, pDoc->EpochTime, m_pServerSock, &m_cControlMessage );

which will call send at the end.

Problem:

If I put a breakpoint in my client at recive function in debuging mode and make it hang there, my server tries to send data to client. after while , my server hangs in the send and send will never returns.

My guess: ( Please tell me if it is right)
the internal buffer that server writes the data gets full since the client is not reciving. so that is why the send does not return.

Solution:

Is there a function on MFC that I can call to check this internal buffer and if it is full then do not try to write to it and skip the send???

Thank you all. I know this is simple problem for many of you but I am just trying to learn MFC.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 5
Reputation: shahin is an unknown quantity at this point 
Solved Threads: 0
shahin shahin is offline Offline
Newbie Poster

Re: MFC Socket programming problem

 
0
  #2
Feb 10th, 2005
Originally Posted by shahin
I have to apologize to the moderators that I was not sure where I should post my question. So if this is wrong fourm feel free to move it to a more suitable place, thank you.

First of all I like to thank everyone here for their help in last thread. My new question is this:

I have a client and server application. I run the client on my laptop and server in desktop. It is simply sending some data from server to client.

This is how I do my send:
pNBaseD->OutputToSocket( pDoc->NetOptionCurrent, pDoc->StaInfo, pDoc->PredStaInfoCurrent, pDoc->MeaAllRaw, m_NetCorr_iPRNArray, m_NetCorr_psNetCorr, m_NetCorr_psPredNetCorr, pDoc->EpochTime, m_pServerSock, &m_cControlMessage );

which will call send at the end.

Problem:

If I put a breakpoint in my client at recive function in debuging mode and make it hang there, my server tries to send data to client. after while , my server hangs in the send and send will never returns.

My guess: ( Please tell me if it is right)
the internal buffer that server writes the data gets full since the client is not reciving. so that is why the send does not return.

Solution:

Is there a function on MFC that I can call to check this internal buffer and if it is full then do not try to write to it and skip the send???

Thank you all. I know this is simple problem for many of you but I am just trying to learn MFC.

No one knows nothing ??!!!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC