|
SatCat5
|
Connection manager for CoAP endpoints using UDP.
This class adds a management API suitable for CoAP over UDP. User-classes should inherit from this class and coap::Endpoint.
Definition at line 183 of file coap_endpoint.h.
#include <coap_endpoint.h>
Public Member Functions | |
| void | bind (satcat5::udp::Port req_port=satcat5::udp::PORT_COAP) |
| Begin accepting incoming requests on the designated UDP port. | |
| satcat5::coap::ConnectionUdp * | connect (const satcat5::udp::Addr &dstaddr, const satcat5::udp::Port &dstport=satcat5::udp::PORT_COAP, const satcat5::udp::Port &srcport=satcat5::udp::PORT_NONE) |
| Open a connection to the designated remote UDP endpoint. More... | |
| satcat5::eth::Dispatch * | eth () const |
| Pointer to the parent's network interface. | |
| satcat5::ip::Dispatch * | ip () const |
| Pointer to the parent's network interface. | |
| satcat5::udp::Dispatch * | udp () const |
| Pointer to the parent's network interface. | |
Protected Member Functions | |
| ManageUdp (satcat5::coap::Endpoint *coap, satcat5::udp::Port req_port=satcat5::udp::PORT_NONE) | |
| Constructor and destructor should only be called by the child. More... | |
Protected Attributes | |
| satcat5::coap::Endpoint *const | m_endpoint |
| Pointer to the associated Endpoint. | |
|
explicitprotected |
Constructor and destructor should only be called by the child.
The default (req_port = PORT_NONE) allows outgoing connections but rejects incoming requests; to change this, provide a port number or call bind() at any time.
Definition at line 144 of file coap_endpoint.cc.
| ConnectionUdp * ManageUdp::connect | ( | const satcat5::udp::Addr & | dstaddr, |
| const satcat5::udp::Port & | dstport = satcat5::udp::PORT_COAP, |
||
| const satcat5::udp::Port & | srcport = satcat5::udp::PORT_NONE |
||
| ) |
Open a connection to the designated remote UDP endpoint.
In most cases, the source port should be left as PORT_NONE, which automatically chooses an unoccupied local port. (Use the returned coap::Connection object to issue requests.)
Definition at line 154 of file coap_endpoint.cc.