Convert cancel to close
Handle zero-length keepalive messages
Remove verbosity
Use a keepalive to detect disconnections on XP