Allowing bind to work with hostname and port

I have added a new bind function which allows you to bind using the
hostname and port to allow people to get the hostname themselves and
pass it in if they have a more efficient way than getCanonicalName