userver: userver/net/blocking/get_addr_info.hpp File Reference
Loading...
Searching...
No Matches
get_addr_info.hpp File Reference

Detailed Description

Blocking Functions for getaddrinfo.

Definition in file get_addr_info.hpp.

Go to the source code of this file.

#include <vector>
#include <userver/engine/io/sockaddr.hpp>
+ Include dependency graph for get_addr_info.hpp:

Functions

std::vector< engine::io::Sockaddrnet::blocking::GetAddrInfo (std::string_view host, const char *service_or_port)
 Resolve host and port via blocking syscall.
 

Function Documentation

◆ GetAddrInfo()

std::vector< engine::io::Sockaddr > net::blocking::GetAddrInfo ( std::string_view host,
const char * service_or_port )

Resolve host and port via blocking syscall.

Note
It is recommended to use clients::dns::Resolver if possible
Parameters
host- hostname (or IP) to resolve
service_and_port- if this argument is a service name, it is translated to the corresponding port number, otherwise treated as port number.