Hi, please try Socket.BeginConnect or Socket.ConnectAsync, both method will connect asynchronously, and you can set a timer or something else to check every 3 seconds, if socket is not connect in 3 seconds, you can use Socket.Close to break the connection process, and then you can start to connect again.
No comments:
Post a Comment