Generalization of a network interface. More...
#include <daemon/face/face.hpp>
Public Member Functions | |
Face (unique_ptr< LinkService > service, unique_ptr< Transport > transport) | |
void | close () |
Request that the face be closed. More... | |
weak_ptr< Channel > | getChannel () const noexcept |
Get channel on which face was created (unicast) or the associated channel (multicast). More... | |
const FaceCounters & | getCounters () const noexcept |
FaceCounters & | getCounters () noexcept |
time::steady_clock::time_point | getExpirationTime () const noexcept |
Returns the expiration time of the face. More... | |
FaceId | getId () const noexcept |
Returns the face ID. More... | |
LinkService * | getLinkService () const noexcept |
ndn::nfd::LinkType | getLinkType () const noexcept |
Returns the link type of the face (point-to-point, multi-access, ...). More... | |
FaceUri | getLocalUri () const noexcept |
Returns a FaceUri representing the local endpoint. More... | |
ssize_t | getMtu () const |
Returns the effective MTU of the face. More... | |
ndn::nfd::FacePersistency | getPersistency () const noexcept |
Returns the current persistency setting of the face. More... | |
FaceUri | getRemoteUri () const noexcept |
Returns a FaceUri representing the remote endpoint. More... | |
ndn::nfd::FaceScope | getScope () const noexcept |
Returns whether the face is local or non-local for scope control purposes. More... | |
FaceState | getState () const noexcept |
Returns the face state. More... | |
Transport * | getTransport () const noexcept |
void | sendData (const Data &data) |
Send Data. More... | |
void | sendInterest (const Interest &interest) |
Send Interest. More... | |
void | sendNack (const lp::Nack &nack) |
Send Nack. More... | |
void | setChannel (weak_ptr< Channel > channel) noexcept |
Set channel on which face was created (unicast) or the associated channel (multicast). More... | |
void | setId (FaceId id) noexcept |
Sets the face ID. More... | |
void | setPersistency (ndn::nfd::FacePersistency persistency) |
Changes the face persistency setting. More... | |
Public Attributes | |
signal::Signal< LinkService, Data, EndpointId > & | afterReceiveData |
Called when a Data packet is received. More... | |
signal::Signal< LinkService, Interest, EndpointId > & | afterReceiveInterest |
Called when an Interest packet is received. More... | |
signal::Signal< LinkService, lp::Nack, EndpointId > & | afterReceiveNack |
Called when a Nack packet is received. More... | |
signal::Signal< Transport, FaceState, FaceState > & | afterStateChange |
Called when the transport state changes. More... | |
signal::Signal< LinkService, Interest > & | onDroppedInterest |
Called when an Interest is dropped by the reliability system for exceeding the allowed number of retransmissions. More... | |
Generalization of a network interface.
A face generalizes a network interface. It provides best-effort network-layer packet delivery services on a physical interface, an overlay tunnel, or a link to a local application.
A face combines two parts: LinkService and Transport. Transport is the lower part, which provides best-effort TLV block deliveries. LinkService is the upper part, which translates between network-layer packets and TLV blocks, and may provide additional services such as fragmentation and reassembly.
nfd::face::Face::Face | ( | unique_ptr< LinkService > | service, |
unique_ptr< Transport > | transport | ||
) |
|
inline |
Request that the face be closed.
This operation is effective only if face is in the UP or DOWN state; otherwise, it has no effect. The face will change state to CLOSING, and then perform a cleanup procedure. When the cleanup is complete, the state will be changed to CLOSED, which may happen synchronously or asynchronously.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
signal::Signal<LinkService, Data, EndpointId>& nfd::face::Face::afterReceiveData |
signal::Signal<LinkService, Interest, EndpointId>& nfd::face::Face::afterReceiveInterest |
signal::Signal<LinkService, lp::Nack, EndpointId>& nfd::face::Face::afterReceiveNack |
signal::Signal<LinkService, Interest>& nfd::face::Face::onDroppedInterest |