Lines Matching refs:port
37 get_port_from_env(int *port)
52 *port = atoi(raw_port_str);
54 if (*port < 0 || *port > 65535) {
55 LogError("Environment var %s contains invalid port value!", PORT_ENV_VAR);
63 convert_port_to_str(int port, char port_str[TCP_PORT_STR_MAX_LEN])
65 if (snprintf(port_str, TCP_PORT_STR_MAX_LEN, "%d", port) < 0)
74 int rv, port = 0;
76 // Retrieves port from env var first
77 rv = get_port_from_env(&port);
80 return convert_port_to_str(port, port_str);
89 // TODO: Future work retrieves port from config file.
91 // Last case, retrieve default port used by server.