Library that I use: link
Follow the code below:
await client.ConnectAsync(address, port);
The above code is the client and works normal. Let's say the server is off, when I run the above code, it takes little time and I get error:
Connection timed out
It takes about 3 minutes to execute this exception. Is there any way to tell if the server is listening before running the above code? Or decrease from 3 minutes to 5 seconds.
Here is the answer on how to get the status: link