userver: userver/net/blocking/get_addr_info.hpp File Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
get_addr_info.hpp File Reference

Blocking Functions for getaddrinfo. More...

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

Go to the source code of this file.

Functions

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

Detailed Description

Blocking Functions for getaddrinfo.

Definition in file get_addr_info.hpp.

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.