すきま風

勉強したことのメモとか

socket timeoutに関するちょっとした誤解

今まで握手してから完全にデータが到達するまでの時間、だと思っていたが、正確にはdata packet間のアイドルタイムの制限時間という意味だった。

https://www.baeldung.com/httpclient-timeout

the Socket Timeout (http.socket.timeout) – the time waiting for data – after establishing the connection; maximum time of inactivity between two data packets

https://stackoverflow.com/questions/7360520/connectiontimeout-versus-sockettimeout

A socket timeout is the timeout when waiting for individual packets. It's a common misconception that a socket timeout is the timeout to receive the full response. So if you have a socket timeout of 1 second, and a response comprised of 3 IP packets, where each response packet takes 0.9 seconds to arrive, for a total response time of 2.7 seconds, then there will be no timeout.

なるほどなー

I wish they had named "socket timeout" as "idle timeout".

禿同