Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Public Member Functions | |
UdpConnection (UdpConnectionDataDelegate dataHandler) | |
virtual bool | listen (int port) |
virtual bool | connect (IPAddress ip, uint16_t port) |
virtual void | close () |
virtual bool | send (const char *data, int length) |
bool | sendString (const char *data) |
bool | sendString (const String &data) |
virtual bool | sendTo (IPAddress remoteIP, uint16_t remotePort, const char *data, int length) |
bool | sendStringTo (IPAddress remoteIP, uint16_t remotePort, const char *data) |
bool | sendStringTo (IPAddress remoteIP, uint16_t remotePort, const String &data) |
Protected Member Functions | |
virtual void | onReceive (pbuf *buf, IPAddress remoteIP, uint16_t remotePort) |
bool | initialize (udp_pcb *pcb=nullptr) |
Static Protected Member Functions | |
static void | staticOnReceive (void *arg, struct udp_pcb *pcb, struct pbuf *p, LWIP_IP_ADDR_T *addr, u16_t port) |
Protected Attributes | |
udp_pcb * | udp = nullptr |
UdpConnectionDataDelegate | onDataCallback = nullptr |