delivery refactoring; add heartbeat; set conn read timeout