ESP8266
|
Public Types | |
typedef std::function< void(void)> | rxhandler_t |
Public Member Functions | |
UdpContext () | |
~UdpContext () | |
void | ref () |
void | unref () |
bool | connect (ip_addr_t addr, uint16_t port) |
bool | listen (ip_addr_t addr, uint16_t port) |
void | disconnect () |
void | setMulticastInterface (ip_addr_t addr) |
void | setMulticastTTL (int ttl) |
void | onRx (rxhandler_t handler) |
size_t | getSize () const |
uint32_t | getRemoteAddress () |
uint16_t | getRemotePort () |
uint32_t | getDestAddress () |
uint16_t | getLocalPort () |
bool | next () |
int | read () |
size_t | read (char *dst, size_t size) |
char | peek () |
void | flush () |
size_t | append (const char *data, size_t size) |
void | send (ip_addr_t *addr=0, uint16_t port=0) |
Private Member Functions | |
void | _reserve (size_t size) |
void | _consume (size_t size) |
void | _recv (udp_pcb *upcb, pbuf *pb, ip_addr_t *addr, u16_t port) |
Static Private Member Functions | |
static void | _s_recv (void *arg, udp_pcb *upcb, pbuf *p, ip_addr_t *addr, u16_t port) |
Private Attributes | |
udp_pcb * | _pcb |
pbuf * | _rx_buf |
bool | _first_buf_taken |
size_t | _rx_buf_offset |
int | _refcnt |
pbuf * | _tx_buf_head |
pbuf * | _tx_buf_cur |
size_t | _tx_buf_offset |
uint16_t | _multicast_ttl |
uint16_t | _dest_port |
ip_addr_t | _dest_addr |
rxhandler_t | _on_rx |
typedef std::function<void(void)> UdpContext::rxhandler_t |
UdpContext::UdpContext | ( | ) |
UdpContext::~UdpContext | ( | ) |
|
private |
|
private |
|
private |
|
staticprivate |
size_t UdpContext::append | ( | const char * | data, |
size_t | size | ||
) |
bool UdpContext::connect | ( | ip_addr_t | addr, |
uint16_t | port | ||
) |
void UdpContext::disconnect | ( | ) |
void UdpContext::flush | ( | ) |
uint32_t UdpContext::getDestAddress | ( | ) |
uint16_t UdpContext::getLocalPort | ( | ) |
uint32_t UdpContext::getRemoteAddress | ( | ) |
uint16_t UdpContext::getRemotePort | ( | ) |
size_t UdpContext::getSize | ( | void | ) | const |
bool UdpContext::listen | ( | ip_addr_t | addr, |
uint16_t | port | ||
) |
bool UdpContext::next | ( | ) |
void UdpContext::onRx | ( | rxhandler_t | handler | ) |
char UdpContext::peek | ( | ) |
int UdpContext::read | ( | ) |
size_t UdpContext::read | ( | char * | dst, |
size_t | size | ||
) |
void UdpContext::ref | ( | ) |
void UdpContext::send | ( | ip_addr_t * | addr = 0 , |
uint16_t | port = 0 |
||
) |
void UdpContext::setMulticastInterface | ( | ip_addr_t | addr | ) |
void UdpContext::setMulticastTTL | ( | int | ttl | ) |
void UdpContext::unref | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |