mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
1.98k stars 436 forks source link

What is the role of timeout in the configuration file? #192

Closed keil-chan closed 6 years ago

keil-chan commented 6 years ago

hi What is the role of timeout in the configuration file?

TCP timeout seconds (tcp_timeout = -1 can disable the timeout check) tcp_timeout = 30

ajamshed commented 6 years ago

Through this configurable variable, you can adjust TCP connection timeout period (in secs). One example when a TCP connection timeout can take place is when a client sends a SYN packet but it fails to receive the corresponding SYN-ACK within a timeout period. In that case, the client socket is going to wait for 30 seconds before the socket is closed.

eunyoung14 commented 6 years ago

To be more specific, tcp_timeout is used to kill dangling connections that do not have any activity for a certain period of time. If a connection does not receive any packet or it's socket is not used for tcp_timeout seconds, it will be directly removed from the stack regardless of its state. This is mainly used for debug purposes.

keil-chan commented 6 years ago

thx all