sending hostname and port separately