Check alive hook implementation
Modified connection test, TCP connection status is much safer than simply testing the socket
Missed an include file