|
TinyPPP
PPP networking over any Arduino Stream
|
UDP socket over PPP: used like WiFiUDP or EthernetUDP. More...
#include <PPPSockets.h>
Public Member Functions | |
| PPPUDP ()=default | |
| UDP on the default stack (the first TinyPPP instance) | |
| PPPUDP (const PPPUDP &)=delete | |
| PPPUDP (IPStack &stack) | |
| UDP on the indicated stack. | |
| ~PPPUDP () | |
| int | available () override |
| Unread bytes of the current datagram. | |
| uint8_t | begin (uint16_t port) override |
| Opens the socket on the port (0: any port): returns 1 on success. | |
| int | beginPacket (const char *host, uint16_t port) override |
| Starts a datagram to the host (resolved via DNS) and port. | |
| int | beginPacket (IPAddress ip, uint16_t port) override |
| Starts a datagram to the address and port. | |
| int | endPacket () override |
| Sends the datagram: returns 1 on success. | |
| void | flush () override |
| Discards the rest of the current datagram. | |
| uint16_t | localPort () |
| Our port. | |
| PPPUDP & | operator= (const PPPUDP &)=delete |
| int | parsePacket () override |
| Moves to the next received datagram: returns its size (0 if none) | |
| int | peek () override |
| Next byte of the current datagram without removing it (-1 if none) | |
| int | read () override |
| Reads one byte of the current datagram (-1 if none) | |
| int | read (char *buf, size_t len) override |
| Reads from the current datagram: returns the number read or -1. | |
| int | read (unsigned char *buf, size_t len) override |
| Reads from the current datagram: returns the number read or -1. | |
| IPAddress | remoteIP () override |
| Sender address of the current datagram. | |
| uint16_t | remotePort () override |
| Sender port of the current datagram. | |
| void | stop () override |
| Closes the socket. | |
| size_t | write (const uint8_t *buf, size_t size) override |
| Adds data to the datagram (max TINYPPP_UDP_TX_BUFFER bytes) | |
| size_t | write (uint8_t b) override |
| Adds one byte to the datagram. | |
Protected Member Functions | |
| IPStack * | stack () const |
Protected Attributes | |
| IPAddress | _rxIP |
| uint16_t | _rxPort = 0 |
| int | _sock = -1 |
| IPStack * | _stack = nullptr |
| uint8_t | _tx [576] |
| IPAddress | _txIP |
| size_t | _txLen = 0 |
| bool | _txOverflow = false |
| uint16_t | _txPort = 0 |
UDP socket over PPP: used like WiFiUDP or EthernetUDP.
|
default |
UDP on the default stack (the first TinyPPP instance)
|
inline |
|
inlineoverride |
Unread bytes of the current datagram.
Opens the socket on the port (0: any port): returns 1 on success.
Starts a datagram to the host (resolved via DNS) and port.
Starts a datagram to the address and port.
|
inlineoverride |
Sends the datagram: returns 1 on success.
|
inlineoverride |
Discards the rest of the current datagram.
|
inline |
Our port.
|
inlineoverride |
Moves to the next received datagram: returns its size (0 if none)
|
inlineoverride |
Next byte of the current datagram without removing it (-1 if none)
|
inlineoverride |
Reads one byte of the current datagram (-1 if none)
Reads from the current datagram: returns the number read or -1.
Reads from the current datagram: returns the number read or -1.
|
inlineoverride |
Sender address of the current datagram.
|
inlineoverride |
Sender port of the current datagram.
|
inlineprotected |
|
inlineoverride |
Closes the socket.
Adds data to the datagram (max TINYPPP_UDP_TX_BUFFER bytes)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |