UDPConnection
A network connection implementation over UDP
|
Data representing a received/sent packet. More...
#include <UDPC.h>
Data Fields | |
char * | data |
uint32_t | flags |
Flags indication some additional information about the received packet. | |
uint32_t | id |
The packet's id. | |
uint16_t | dataSize |
The size in bytes of the received packet's data inside the data pointer member variable. | |
uint16_t | rtt |
UDPC_ConnectionId | sender |
The UDPC_ConnectionId of the sender. | |
UDPC_ConnectionId | receiver |
The UDPC_ConnectionId of the receiver. | |
Data representing a received/sent packet.
If data is NULL or dataSize is 0, then this packet is invalid.
char* UDPC_PacketInfo::data |
A char array of size dataSize. Will be NULL if this UDPC_PacketInfo is invalid.
uint16_t UDPC_PacketInfo::dataSize |
The size in bytes of the received packet's data inside the data pointer member variable.
UDPC does not return an empty packet when calling UDPC_get_received(), so in such a packet dataSize shouldn't be zero. (UDPC only stores received packets that do have a payload.) This means that if this variable is 0, then this UDPC_PacketInfo is invalid.
uint32_t UDPC_PacketInfo::flags |
Flags indication some additional information about the received packet.
The following list indicates what each used bit in flags
refers to.
uint32_t UDPC_PacketInfo::id |
The packet's id.
Packets start with id = 0, and will wrap around. This can be used to determine specifically how out of order a packet may be.