If there is no data exchange after the TCP connection is established, the function of sending probe packets and receiving ack to check if the connection is still ongoing is called keepalive.
When there is a TCP Server and there is a TCP Client, does only the server send probe packets?
In the current PC (Client) - Embedded product (Server) configuration, I always checked that the TCP server sends keepalive probe packets, but does the client not send probe packets? Thank you.
tcp
Usually, when communicating with sockets, you can specify socket options related to KEEPALIVE, so if a packet does not arrive for a certain period of time (KEEPALIVE TIMER VALUE), you can send it to the server or client. You can specify both the server and the client, or you can specify only one of them, and if you set both, you can only see that the one who set the short timeout is sending a KEEPALIVE.
© 2024 OneMinuteCode. All rights reserved.