7#include <boost/assert.hpp>
33 uint16_t target_host_port,
int af_hint = AF_UNSPEC);
73 void bind(
const struct sockaddr *addr,
int flags);
AddressHandle is a light-weight wrapper around a struct / sockaddr_in(6), and is therefore cheap to c...
Definition name_resolution.h:32
StreamServerBase(const StreamServerBase &)=delete
Promise< TcpStream > connect()
Definition tcp.cc:120
std::optional< AddressHandle > resolvedAddress_
Definition tcp.h:50
TcpClient & operator=(const TcpClient &)=delete
TcpClient & operator=(TcpClient &&other) noexcept
Definition tcp.cc:113
static void onConnect(uv_connect_t *req, uv_status status)
Definition tcp.cc:159
TcpClient(const TcpClient &)=delete
TcpClient(const Loop &loop, std::string target_host_address, uint16_t target_host_port, int af_hint=AF_UNSPEC)
Definition tcp.cc:101
uint16_t port_
Definition tcp.h:54
int af_hint_
Definition tcp.h:53
const Loop * loop_
Definition tcp.h:48
std::string host_
Definition tcp.h:52
TcpServer(const Loop &loop, AddressHandle bindAddress, bool ipv6Only=false)
Sets up and bind socket to address.
Definition tcp.cc:172
void bind(const struct sockaddr *addr, int flags)
Definition tcp.cc:180
TcpServer(const TcpServer &)=delete
TcpServer & operator=(TcpServer &&)=default
TcpServer(TcpServer &&)=default
TcpServer & operator=(const TcpServer &)=delete
int uv_status
Result of a libuv operation, an errno error code.
Definition internal_utils.h:22
Definition async_work.cc:18