In TCP protocol, it send the data to server and receive acknowledgement. if failed receive acknowledgement, then it will send again same data. it will try this for certain time. how can i control in socket created in linux? not seen any option in setsockopt function. is there any function exist to control this?
I read SO_RCVTIMEO and SO_SNDTIMEO can control timing. if this time expire, then crossponding sending or receiving will fail. it will try again. how can i control that try to connection. is there any option?
in TCP once it send the packet and wait for acknowledge. if it is not receiving any ack, then it will send again data. after multiple attempts, it will show failed status. is there any way to control these multiple attempts?
As with so many things in Linux, this is explained in the man page
man tcp wrote:
These variables can be accessed by the /proc/sys/net/ipv4/* files or
with the sysctl(2) interface.
tcp_retries2 (integer; default: 15)
The maximum number of times a TCP packet is retransmitted in
established state before giving up. The default value is 15,
which corresponds to a duration of approximately between 13 to
30 minutes, depending on the retransmission timeout. The
RFC 1122 specified minimum limit of 100 seconds is typically
deemed too short.