How do you set a TCPClients Send/Receive Timeout when using the .NET Compact Framework?
Posted on 2006-05-08
I have a TCP/IP cleint application which uses the TCPClient object to communicate with a TCP server. Occassionaly, I am getting the error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond." I believe this is happening when the data stream become larger (> 1K). I am using asynchronous communications, BeginRead, EndRead, etc. How can I prevent this error. I noticed the SendTimeout, ReceiveTimeout properties on the TCPClient object, but they are not supported by the .NET Compact Framework. What is the best way to handle this situation?