22 #ifndef NDN_UDP_TRANSPORT_LITE_HPP
23 #define NDN_UDP_TRANSPORT_LITE_HPP
25 #include "../../c/errors.h"
26 #include "../../c/transport/transport-types.h"
27 #include "../util/dynamic-uint8-array-lite.hpp"
28 #include "../encoding/element-listener-lite.hpp"
74 send(
const uint8_t* data,
size_t dataLength);
Copyright (C) 2013-2015 Regents of the University of California.
Definition: common.hpp:35
An ElementListenerLite holds an OnReceivedElementLite function pointer.
Definition: element-listener-lite.hpp:37
ndn_Error close()
Close the socket.
Definition: udp-transport-lite.cpp:56
A DynamicUInt8ArrayLite holds a pointer to an allocated array, the length of the allocated array...
Definition: dynamic-uint8-array-lite.hpp:35
static bool isLocal()
Determine whether this transport is to a node on the current machine.
Definition: udp-transport-lite.cpp:34
static UdpTransportLite & upCast(ndn_UdpTransport &transport)
Upcast the reference to the ndn_UdpTransport struct to a UdpTransportLite.
Definition: udp-transport-lite.hpp:106
ndn_Error connect(const char *host, unsigned short port, ElementListenerLite &elementListener)
Connect with UDP to the host:port.
Definition: udp-transport-lite.cpp:38
ndn_Error send(const uint8_t *data, size_t dataLength)
Send data to the socket.
Definition: udp-transport-lite.cpp:44
ndn_Error processEvents(uint8_t *buffer, size_t bufferLength)
Process any data to receive.
Definition: udp-transport-lite.cpp:50
UdpTransportLite(DynamicUInt8ArrayLite &buffer)
Create a UdpTransport with default values for no connection yet and to use the given DynamicUInt8Arra...
Definition: udp-transport-lite.cpp:28
Definition: transport-types.h:39
Definition: udp-transport-lite.hpp:32