Add TCP keepalive

Fixes issue #103 (on Linux devices)

Preferences don't include realtime updates to the current connection,
although that would be possible.