|
Radius
|
Class to encapsulate a UDP socket. More...
#include <UDPSocket.h>
Public Member Functions | |
| UDPSocket () | |
| Constructor. | |
| void | begin () |
| Initialise the socket. | |
| uint16_t | sendto (const uint8_t *data, uint16_t length, IP4Address address, uint16_t port) |
| uint16_t | available () |
| uint16_t | recvfrom (uint8_t *data, uint16_t maxLength, IP4Address address, uint16_t *port) |
Class to encapsulate a UDP socket.
This class is used by RadiusMsg to send and receive UDP requests on a LAN through the Arduino Ethernet shield. This is needed because the revfrom function in utilitysocket.c in the Ethernet library does not work properly
| uint16_t UDPSocket::available | ( | ) |
Checks whether a UDP packet is available.
Referenced by recvfrom(), and RadiusMsg::sendWaitReply().
| uint16_t UDPSocket::recvfrom | ( | uint8_t * | data, |
| uint16_t | maxLength, | ||
| IP4Address | address, | ||
| uint16_t * | port | ||
| ) |
| [in] | data | |
| [in] | maxLength | |
| [in] | address | Pointer to an IP4Address which wil be filled in with the senders IP address |
| [in] | port | Pointer to a port number which will be filled in with the senders port number |
References available().
Referenced by RadiusMsg::recv().
| uint16_t UDPSocket::sendto | ( | const uint8_t * | data, |
| uint16_t | length, | ||
| IP4Address | address, | ||
| uint16_t | port | ||
| ) |
Send octets to the given address
| [in] | data | Data octets to send in a UDP packet |
| [in] | length | Number of octets of data |
| [in] | address | IP4Address of teh destination host |
| [in] | port | Port number of the destination pport |
Referenced by RadiusMsg::sendto().
1.8.2