The serviceAvailable API checks whether a serviceName is active by returning an object that reveals the availability and status of the service. Similarly, we need an API to check whether the connection is active/live or inactive/dead.