0

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.

1
Contributor
1
Reply
2
Views
12 Years
Discussion Span
Last Post by shahin
0

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 ??!!!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.