Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
UdpConnection Class Reference
Inheritance diagram for UdpConnection:
NtpClient

Public Member Functions

 UdpConnection (UdpConnectionDataDelegate dataHandler)
 
virtual bool listen (int port)
 
virtual bool connect (IPAddress ip, uint16_t port)
 
virtual void close ()
 
virtual void send (const char *data, int length)
 
void sendString (const char *data)
 
void sendString (const String data)
 
virtual void sendTo (IPAddress remoteIP, uint16_t remotePort, const char *data, int length)
 
void sendStringTo (IPAddress remoteIP, uint16_t remotePort, const char *data)
 
void sendStringTo (IPAddress remoteIP, uint16_t remotePort, const String data)
 

Protected Member Functions

virtual void onReceive (pbuf *buf, IPAddress remoteIP, uint16_t remotePort)
 
void initialize (udp_pcb *pcb=NULL)
 

Static Protected Member Functions

static void staticOnReceive (void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, u16_t port)
 

Protected Attributes

udp_pcb * udp
 
UdpConnectionDataDelegate onDataCallback