Added a function to determine the host network IP address. The port is still specified via the command line.