Using host when creating sockets