0

So i have this SimpleClient.cs class that handles a async (begin/end) connection to a server. This client can be disconnected, and i need to try & reconnect after 5 seconds.

I get the disconnected event from the SimpleClient and i want to wait 5 seconds before i try & BeginConnect again.

Whats the best approach ? Im thinking about using a Task and a .Wait for the 5 seconds then try the reconnect. I need other opinions about it if there is a better way of achieving this. Thanks !

Haytam
  • 4,643
  • 2
  • 20
  • 43

0 Answers0