This patch enables TCP keepalives on VNC connections and TCP-based char devices. Default parameters have keep alive probes sent after 60-seconds of idle time. Probes are sent every 12 seconds with the connection resetting after 5 failed probes (ie., connection is closed if no response received in 60-seconds). Changes v1 -> v2: - Added probes to configure - Moved setsockopt calls into a generic handler named enable_tcp_keepalive in net.c - Added call to enable_tcp_keepalive() to vnc and qemu-char Signed-off-by: David Ahern david