template<class Port, template<typename, typename> class map = default_map, template<typename> class Allocator = std::allocator, typename Endpoint = detail::address>
aes70::udp::port class

This class implements a generic UDP endpoint.

Constructors, destructors, conversion operators

template<typename... TN>
port(TN && ... args)

Public functions

auto receive(uint8_t* src, uint8_t* src_end, const Endpoint& source) -> bool
auto allocate(size_t len) -> uint8_t* pure virtual
void send(const Endpoint& destination) pure virtual
auto get_current_time() -> uint32_t pure virtual
void poll()

Function documentation

template<classPort, template<typename, typename> classmap, template<typename> classAllocator, typenameEndpoint> template<typename... TN>
aes70::udp::port<Port, map, Allocator, Endpoint>::port(TN && ... args)

This constructor forwards all arguments to the base class (Port template argument).

template<classPort, template<typename, typename> classmap, template<typename> classAllocator, typenameEndpoint>
bool aes70::udp::port<Port, map, Allocator, Endpoint>::receive(uint8_t* src, uint8_t* src_end, const Endpoint& source)

Receive some data.

template<classPort, template<typename, typename> classmap, template<typename> classAllocator, typenameEndpoint>
uint8_t* aes70::udp::port<Port, map, Allocator, Endpoint>::allocate(size_t len) pure virtual

Allocator buffer space for an outgoing packet.

template<classPort, template<typename, typename> classmap, template<typename> classAllocator, typenameEndpoint>
void aes70::udp::port<Port, map, Allocator, Endpoint>::send(const Endpoint& destination) pure virtual

Send a packet previously allocated with allocate.

template<classPort, template<typename, typename> classmap, template<typename> classAllocator, typenameEndpoint>
uint32_t aes70::udp::port<Port, map, Allocator, Endpoint>::get_current_time() pure virtual

Return an arbitrary time in milliseconds. This timestamp is used to handle keepalive and connection timeouts.

template<classPort, template<typename, typename> classmap, template<typename> classAllocator, typenameEndpoint>
void aes70::udp::port<Port, map, Allocator, Endpoint>::poll()

This method needs to be called regularly in order to send keepalive packets and detect connection timeouts.