Added Connected method

It is useful to know if the connection is connected or not. This PR adds a `Connected` method.