Add transport independent connect function

Fixes #32
Merge pull request #38 from hurtonm/master

Add transport independent connect function