Basic backport of Qpid Transport code, but not the docs