#include <UDP.h>
Public Member Functions | |
bool | Receive (std::vector< uint8 > &data, Address *source=0) |
Receives the next packet and appends it to data. source (if not 0) will be filled with the address the packet came from. Returns false if there was nothing to receive. | |
uint16 | GetPort () const |
Retrieves the port to which the receiver is bound. | |
Static Public Member Functions | |
static UDPReceiver * | CreateReceiver (uint16 port) |
Binds a socket to a port in order to receive upd packets. If the port cannot be bound or an error occurs, returns 0. | |
static void | FreeReceiver (UDPReceiver *receiver) |
Unbinds and frees a UDPReceiver. |