Added ability to pass the keepalive parameter into the extended class.
Adding client and server heartbeat monitoring for streams.
PR Change name of read_heartbeat to check_heartbeat.