Hi harshit, sorry for the long delay. This is a fine attempt but has some issues...
It breaks both method's pydocs. The first comment block of a method is special in that Sphinx uses it to generate API documentation.
Rather than allowing hostnames for the address argument it would be better if we added a new 'hostname' argument. This way the argument isn't a misnomer and can't accidently trigger a DNS lookup (which could leak data in some environments).
This change would require unit and integ test coverage.
added functionality to connect using URL