how to set the connection time out for a tcp client
C#
2
Posts
2
Posters
0
Views
1
Watching
-
i searched no this to set the time out , i found that there is no such method and by default it waits 15 seconds, and i saw a sample using a timer , but need to know a better solution for this , is any idea ?
-
i searched no this to set the time out , i found that there is no such method and by default it waits 15 seconds, and i saw a sample using a timer , but need to know a better solution for this , is any idea ?
Using asynchronous methods and a timer is pretty much how you do it. If you aren't happy with that then you could create a wrapper class that hides all of the details and offers a
Connect(address, port, timeout)
method to make things easier for yourself.:badger: