CCF
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
asynchost::UDPImpl Class Reference

#include <udp.h>

Inherits asynchost::with_uv_handle< uv_udp_t >.

Public Member Functions

void set_behaviour (std::unique_ptr< SocketBehaviour< UDP > > b)
 
std::string get_host () const
 
std::string get_port () const
 
std::optional< std::string > get_listen_name () const
 
bool listen (const std::string &host_, const std::string &port_, const std::optional< std::string > &name=std::nullopt)
 Listen to packets on host:port.
 
void start (int64_t id)
 Start the service via behaviour (register on ringbuffer, etc)
 
bool connect (const std::string &host_, const std::string &port_)
 
bool write (size_t len, const uint8_t *data, sockaddr addr)
 

Static Public Member Functions

static void reset_read_quota ()
 

Friends

class close_ptr< UDPImpl >
 

Additional Inherited Members

- Protected Member Functions inherited from asynchost::with_uv_handle< uv_udp_t >
 with_uv_handle ()
 
 with_uv_handle (const with_uv_handle< uv_udp_t > &that)=delete
 
 with_uv_handle (with_uv_handle< uv_udp_t > &&that)=delete
 
virtual ~with_uv_handle ()=default
 
void close ()
 
- Protected Attributes inherited from asynchost::with_uv_handle< uv_udp_t >
uv_udp_t uv_handle
 

Detailed Description

For now this is server only, as we have no immediate plans to create node-to-node UDP channels or use UDP for REST between nodes

Member Function Documentation

◆ connect()

bool asynchost::UDPImpl::connect ( const std::string &  host_,
const std::string &  port_ 
)
inline

◆ get_host()

std::string asynchost::UDPImpl::get_host ( ) const
inline

◆ get_listen_name()

std::optional< std::string > asynchost::UDPImpl::get_listen_name ( ) const
inline

◆ get_port()

std::string asynchost::UDPImpl::get_port ( ) const
inline

◆ listen()

bool asynchost::UDPImpl::listen ( const std::string &  host_,
const std::string &  port_,
const std::optional< std::string > &  name = std::nullopt 
)
inline

Listen to packets on host:port.

◆ reset_read_quota()

static void asynchost::UDPImpl::reset_read_quota ( )
inlinestatic

◆ set_behaviour()

void asynchost::UDPImpl::set_behaviour ( std::unique_ptr< SocketBehaviour< UDP > >  b)
inline

◆ start()

void asynchost::UDPImpl::start ( int64_t  id)
inline

Start the service via behaviour (register on ringbuffer, etc)

◆ write()

bool asynchost::UDPImpl::write ( size_t  len,
const uint8_t *  data,
sockaddr  addr 
)
inline

Friends And Related Symbol Documentation

◆ close_ptr< UDPImpl >

friend class close_ptr< UDPImpl >
friend

The documentation for this class was generated from the following files: