bash - decrease TCP connect() system call timeout -
in command below enable file /dev/tcp/10.10.10.1/80 both reading , writing , associate file descriptor 3:
$ time exec 3<>/dev/tcp/10.10.10.1/80 bash: connect: operation timed out bash: /dev/tcp/10.10.10.1/80: operation timed out real 1m15.151s user 0m0.000s sys 0m0.000s $ this automatically tries perform tcp three-way handshake. if 10.10.10.1 not reachable in illustration above, connect scheme phone call tries connect 75 seconds. 75 sec timeout determined bash? or scheme default? lastly not least, there way decrease timeout value?
it determined tcp. can decreased on per-socket basis application code.
nb timeout takes effect if there no response @ all. if there connection refusal, error occurs immediately.
bash tcp
No comments:
Post a Comment