SatCat5
satcat5::coap::ManageUdpHeap Class Reference

Detailed Description

Variant of ManageUdp using heap-allocated Connection objects.

Definition at line 15 of file coap_posix.h.

#include <coap_posix.h>

Inheritance diagram for satcat5::coap::ManageUdpHeap:
[legend]
Collaboration diagram for satcat5::coap::ManageUdpHeap:
[legend]

Public Member Functions

 ManageUdpHeap (satcat5::coap::Endpoint *coap, unsigned size)
 Constructor binds to the specified UDP interface and immediately allocates each requested Connection object.
 
ConnectionUdpconnection (unsigned idx)
 Fetch connection object by index.
 
void bind (satcat5::udp::Port req_port=satcat5::udp::PORT_COAP)
 Begin accepting incoming requests on the designated UDP port.
 
satcat5::coap::ConnectionUdpconnect (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::Dispatcheth () const
 Pointer to the parent's network interface.
 
satcat5::ip::Dispatchip () const
 Pointer to the parent's network interface.
 
satcat5::udp::Dispatchudp () const
 Pointer to the parent's network interface.
 

Protected Attributes

std::vector< ConnectionUdp * > m_connections
 Pointers to heap-allocated Connection objects.
 
satcat5::coap::Endpoint *const m_endpoint
 Pointer to the associated Endpoint.
 

Member Function Documentation

◆ connect()

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 
)
inherited

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.


The documentation for this class was generated from the following files: