Syntax
virtual int parsePacket();
ContentsIndex
PreviousUpNext
LUDP::parsePacket Method
LUDP Class | Example
Syntax
virtual int parsePacket();
Description

Check if there are incoming UDP datagrams. read() should be then used to actually read the data from packet.

Returns

size of the datagram packet, in bytes. 0 is returned if there is no incoming packet. 

 

Example
    if(udp.parsePacket()){
    Serial.println("packet received");
    // read the packet, byte by byte
    int v = udp.read();
    while(v != -1){
        Serial.print((char)v);
        v = udp.read();
    }
File

LUdp.h

Class