More comms tests

A new setting for keep alive time, so tests and a minor fix.
-Mark.