exposing port and host functions to client connections