Socket stops responding

Hi.

I am debugging 2 applications that communicate (client/server)through a CSocket derived class with CArchive. The applications work fine on many computers but on some, it freeze because the open socket stops responding... (Note that the application does not crash, it only freeze because it is waiting for the response. I can create a thread but I need to find out why the socket stop responding...)

Running in debug, I can trace that the CArchive flush data correctly (no CFileException), but on the other side, OnReceived is not set (only when the application has freezed).

I have tried to check if the socket is blocked but it is not the case. I have tried to do an assertvalid but it is still ok. I tried to peekmessage, translate and dispatch message but it won't help. I check out every memcpy, memset and every arrays if no memory has been corrupted but found nothing.

I don't know what I can try more now. Have any idea ?

:confused:
[1000 byte] By [Fylom] at [2007-11-18 20:27:52]
# 1 Re: Socket stops responding
Don't know much about MCF sockets, but CSocket is buggy. If the design allows, you can use simple blocking socket APIs, which is easier with a bit of learning.
Mathew Joy at 2007-11-9 13:46:36 >
# 2 Re: Socket stops responding
Check out raw winsock.

Kuphryn
kuphryn at 2007-11-9 13:47:37 >
# 3 Re: Socket stops responding
if you want to use non-blocking socket ( api ), use select() before send, recv data from the other side.

wxuf
wxuf at 2007-11-9 13:48:37 >