use HOST_NAME_MAX
remove find_open_port() and get_host_name()