Added port number as argument (defaults to port 9)
Changed port argument to be an endpoint instead