W5100 disconnect

Hello,
The W5100 does not “sense” when I remove the ethernet cable. The socket remains open.
Is there a way to know if the cable is removed?
I also sometimes operate the W5100 through vpn where the connection may be lost but the cable is still connected. Is there a way to know if the connection is lost?

Thanks!!!

The only way to know if the cable is removed is to transfer the data.
When the cable is removed and data is transmitted, the connection is disconnected by timeout because the Ack is not received.
Some chips of WIZnet such as W5500 and W5100S have a keep alive function that automatically sends packets periodically, but in the case of W5100, there is no such function.

When the connection is lost, the value of the Sn_SR register changes. Please check this.