calamity-inc / Soup

The everything library for C++ 17 and beyond with bindings for other languages.
MIT License
14 stars 5 forks source link

Rewrite Socket::connect to have a (consistent) timeout #79

Closed Sainan closed 1 year ago

Sainan commented 1 year ago

Windows gives about 10 seconds until it times out, but on Linux, it takes fucking ages to time out, so manually handling this seems like the obvious solution.

I think 3 seconds ought to be enough time, also have to consider that a connect operation is blocking other connect operations because it's not thread-safe (on Windows).