Added tests and refactored a bit.
This makes it possible to use a factory function to create a transport of the right type and not having to repeat the address when calling Transport.Connect()