Currently there is a function or public field to know if the connection is connected/closed. It is possible add one