I guess at this point the best way is to check the code.
Maybe connectToHost() calls bind again or unbinds, etc.

But you should ask yourself if this is really worth it if you can just simply use the API that you know to work and abstract yourself.

Cheers,
_