The connection_status() function returns the current connection status.
int connection_status ( void )
Gets the connection status bitfield.
Possible values that can be returned are:
Returns the connection status bitfield, which can be used against the CONNECTION_XXX constants to determine the connection status.