39typedef struct as_sockaddr_iterator_s {
72 struct sockaddr* sa = iter->
current->ai_addr;
75 if (sa->sa_family == AF_INET) {
76 ((
struct sockaddr_in*)sa)->sin_port = iter->
port_be;
79 ((
struct sockaddr_in6*)sa)->sin6_port = iter->
port_be;
101 struct as_cluster_s* cluster,
as_error* err,
struct as_host_s* host,
struct sockaddr* addr,
102 bool detect_load_balancer,
struct as_node_info_s* node_info
static bool as_lookup_next(as_address_iterator *iter, struct sockaddr **addr)
as_status as_lookup_host(as_address_iterator *iter, as_error *err, const char *hostname, uint16_t port)
as_status as_lookup_node(struct as_cluster_s *cluster, as_error *err, struct as_host_s *host, struct sockaddr *addr, bool detect_load_balancer, struct as_node_info_s *node_info)
static void as_lookup_end(as_address_iterator *iter)
struct addrinfo * current
struct addrinfo * addresses