News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[nettool] Timeout as optional parameter

Started by Michael 'Cruzer', November 12, 2014, 04:23:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michael 'Cruzer'

Since nettool is very handy for usage in scripting it would be great if someone would be able to define some timeout to be used after which nettool should cancel it's work.
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.

prissi

The timeout is usually given by the system. I think it was around 90s on windows and 15s on Linux.

Ters

I think that depends on what is timing out. I've seen dead TCP connections hanging for days. Apparently, the TCP stack can only detect that the connection is dead if attempts are being made at sending something. It can't know that the lack of traffic is because the peer is dead, and not just due to the fact that the peer has nothing to say. Read timeouts must be specified by the application, because only it can know when to expect an answer.

That is assuming that the request has anything to do with network connections at all, and not timeouts on some potentially time consuming processing inside nettool itself (about which I know nothing).

prissi

nettool uses 10s timeout for nearly everything (only 60s during game transfer). At which action it hangs exactly?

Michael 'Cruzer'

I didn't intended the TCP timeout. My script uses it to check the online players of localhost but I don't wanted it to get hang when a sync is forced (like login/logout).
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.

prissi

Sorry, I am lost. I have never ever used nettool, so I have no idea how it works and when it can hang.