Once the connection has been established, if no peer sends any data, then no packets are sent over the net. TCP is an idle protocol, so it assumes the connection is still active.
You can try to open a second connection and attempt to connect, but this has some disadvantages: you are consuming more resources, creating new threads, etc. Also, if the other peer has rebooted, the second connection will work but the first will not.
If you try to send a ping or whatever message with a half-open connection, you will see that you don't get any error.
A TCP keep-alive packet is simply an ACK with the sequence number set to one less than the current sequence number for the connection. A host receiving one of these ACKs responds with an ACK for the current sequence number. Keep-alives can be used to verify that the computer at the remote end of a connection is still available. TCP keep-alives can be sent once every TCPKeepAlive.Time (defaults to 7,200,000 milliseconds or two hours) if no other data or higher-level keep-alives have been carried over the TCP connection. If there is no response to a keep-alive, it is repeated once every TCPKeepAlive.Interval seconds. KeepAliveInterval defaults to 1000 milliseconds.
You can enable per-connection KeepAlive and allow the TCP protocol to check if the connection is active or not. This is the preferred method if you want to detect dropped disconnections (for example: when you unplug a network cable).
oClient := TsgcWebSocketClient.Create(nil);
oClient.TCPKeepAlive.Enabled := True;
oClient.TCPKeepAlive.Time := 5000;
oClient.TCPKeepAlive.Interval := 1000;