Microsoft uses the guidelines for TCP/IP connections. That is, it will wait till 30 seconds (which feels a lot longer when you wait for something to happen on a computer) before it will give up on any network connection. This is part of a (sub-)set of parameters you can only change in the registry. MS doesn't have any window, field, picker, drop-down menu, check box or radio button for these parameters to be adjusted...on purpose.
The information is available on the MSDN/TechNet websites. Have found it there myself, but those settings can have serious implications, so I won't link to it either.
"Funny" thing is...if your application isn't multi-threaded and it tries to make a network connection it will wait 30 seconds before continuing, if the application needs to make another network connection, it will wait again for 30 seconds. This cycle is repeated every time for every network connection. The user gets the impression the application hangs, but in reality the application works like specified. It's the TCP/IP specifications that create the problem here.