Is it possible to continue using a .NET Socket
after synchronous Send/Receive method throws a SocketException
because of exceeding the specified Send/Receive Timeout? Here it is said that methods will throw exception immediately after the first Timeout. I would like to get some information about what socket will do(close itself?) and if socket can be used normally after handling the SocketException
(Timeout). I haven't seen anything related on MSDN docs.
Asked
Active
Viewed 386 times
-1
-
1The Socket won't do anything to itself if it's just timed out - you can retry the Send/Receive again. – Roger Rowland Mar 05 '13 at 13:18
-
If the Socket threw an exception it means there is no connection. You certainly can still use the same Socket reference provided you make a attempt to make new connection of course. – Security Hound Mar 05 '13 at 13:43
-
@Ramhound That is not correct. A timeout does not destroy the connection. – user207421 Mar 06 '13 at 03:11
-
@EJP - I didn't say it did. – Security Hound Mar 06 '13 at 12:19
-
@Ramhound You most certainly did say exactly that: 'if the Socket threw an exception it means there is no connection'. That is incorrect in the case of a timeout exception. – user207421 Mar 27 '13 at 06:25
-
@EJP - In the case of a timeout exception it would indicate there was never a connection established thus the no connection to be destroyed. – Security Hound Mar 27 '13 at 12:12
-
@Ramhound When you've made up your mind what you are and aren't saying, in the case of a *read* timeout it indicates there *was* a connection to read, and after the timeout the connection is still viable. – user207421 Apr 05 '13 at 01:52
1 Answers
0
I believe the comments given saying that socket can be used normally after timeout, though I haven't tried myself.

Alp
- 553
- 11
- 30