Network layer face.
More...
#include <face.hpp>
Inherits ndnph::WithRegion.
◆ Face() [1/2]
Constructor.
- Parameters
-
region | where to allocate memory for packet objects (e.g. DataObj ) during RX. This region may be shared among multiple faces, but cannot be shared with the fragmenter or reassembler associated with this face. Face does not use this region for packet buffers, but it is passed to PacketHandler processing functions. If a packet processing function creates a new packet in this region and transmits that packet, that packet would be temporarily encoded in this region during TX. |
transport | underlying transport. |
◆ Face() [2/2]
◆ addHandler()
bool ndnph::Face::addHandler |
( |
PacketHandler & |
h, |
|
|
int8_t |
prio = 0 |
|
) |
| |
Add a packet handler.
- Parameters
-
prio | priority, smaller number means higher priority. |
◆ getCurrentPacketInfo()
const PacketInfo* ndnph::Face::getCurrentPacketInfo |
( |
| ) |
const |
|
inline |
◆ getTransport()
Transport& ndnph::Face::getTransport |
( |
| ) |
const |
|
inline |
Access the underlying transport.
◆ loop()
void ndnph::Face::loop |
( |
| ) |
|
Process periodical events.
This must be invoked periodically.
◆ removeHandler()
◆ send()
template<typename Packet >
bool ndnph::Face::send |
( |
Region & |
region, |
|
|
const Packet & |
packet, |
|
|
PacketInfo |
pi |
|
) |
| |
Synchronously transmit a packet.
- See also
- PacketHandler::send
◆ setFragmenter()
Enable NDNLPv2 fragmentation.
- Parameters
-
frag | fragmenter. It must be kept until face is destructed. |
If fragmentation is disabled (this function has not been invoked), the face would attempt to transmit each outgoing packet in full. Oversized packets may be rejected by the transport.
◆ setReassembler()
Enable NDNLPv2 reassembly.
- Parameters
-
reass | reassembler. It must be kept until face is destructed. |
If reassembly is disabled (this function has not been invoked), the face would drop incoming fragments.
The documentation for this class was generated from the following file:
- /home/runner/work/esp8266ndn/NDNph/src/ndnph/face/face.hpp