#include <tcp.h>
Inherits asynchost::with_uv_handle< uv_tcp_t >.
|
void | set_behaviour (std::unique_ptr< SocketBehaviour< TCP > > b) |
|
std::string | get_host () const |
|
std::string | get_port () const |
|
std::string | get_peer_name () const |
|
std::optional< std::string > | get_listen_name () const |
|
void | client_bind () |
|
void | on_client_resolved (uv_getaddrinfo_t *req, int rc) |
|
void | start (int64_t id) |
| This is to mimic UDP's implementation. TCP's start is on_accept.
|
|
bool | connect (const std::string &host_, const std::string &port_, const std::optional< std::string > &client_host_=std::nullopt) |
|
bool | reconnect () |
|
bool | listen (const std::string &host_, const std::string &port_, const std::optional< std::string > &name=std::nullopt) |
|
bool | write (size_t len, const uint8_t *data, sockaddr addr={}) |
|
◆ client_bind()
void asynchost::TCPImpl::client_bind |
( |
| ) |
|
|
inline |
◆ connect()
bool asynchost::TCPImpl::connect |
( |
const std::string & |
host_, |
|
|
const std::string & |
port_, |
|
|
const std::optional< std::string > & |
client_host_ = std::nullopt |
|
) |
| |
|
inline |
◆ get_host()
std::string asynchost::TCPImpl::get_host |
( |
| ) |
const |
|
inline |
◆ get_listen_name()
std::optional< std::string > asynchost::TCPImpl::get_listen_name |
( |
| ) |
const |
|
inline |
◆ get_peer_name()
std::string asynchost::TCPImpl::get_peer_name |
( |
| ) |
const |
|
inline |
◆ get_port()
std::string asynchost::TCPImpl::get_port |
( |
| ) |
const |
|
inline |
◆ listen()
bool asynchost::TCPImpl::listen |
( |
const std::string & |
host_, |
|
|
const std::string & |
port_, |
|
|
const std::optional< std::string > & |
name = std::nullopt |
|
) |
| |
|
inline |
◆ on_client_resolved() [1/2]
void asynchost::TCPImpl::on_client_resolved |
( |
uv_getaddrinfo_t * |
req, |
|
|
int |
rc |
|
) |
| |
|
inline |
◆ on_client_resolved() [2/2]
static void asynchost::TCPImpl::on_client_resolved |
( |
uv_getaddrinfo_t * |
req, |
|
|
int |
rc, |
|
|
struct addrinfo * |
|
|
) |
| |
|
inlinestatic |
◆ reconnect()
bool asynchost::TCPImpl::reconnect |
( |
| ) |
|
|
inline |
◆ reset_read_quota()
static void asynchost::TCPImpl::reset_read_quota |
( |
| ) |
|
|
inlinestatic |
◆ set_behaviour()
◆ start()
void asynchost::TCPImpl::start |
( |
int64_t |
id | ) |
|
|
inline |
This is to mimic UDP's implementation. TCP's start is on_accept.
◆ write()
bool asynchost::TCPImpl::write |
( |
size_t |
len, |
|
|
const uint8_t * |
data, |
|
|
sockaddr |
addr = {} |
|
) |
| |
|
inline |
◆ close_ptr< TCPImpl >
The documentation for this class was generated from the following files: