Class implementing an Ethernet-based channel to create faces. More...
#include <daemon/face/ethernet-channel.hpp>
Classes | |
class | Error |
EthernetChannel-related error. More... | |
Public Member Functions | |
EthernetChannel (shared_ptr< const ndn::net::NetworkInterface > localEndpoint, time::nanoseconds idleTimeout) | |
Create an Ethernet channel on the given localEndpoint (network interface). More... | |
void | connect (const ethernet::Address &remoteEndpoint, const FaceParams ¶ms, const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onConnectFailed) |
Create a unicast Ethernet face toward remoteEndpoint . More... | |
size_t | getDefaultMtu () const noexcept |
Returns the default MTU for all faces created by this channel. More... | |
const FaceUri & | getUri () const noexcept |
bool | isListening () const final |
Returns whether the channel is listening. More... | |
void | listen (const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onFaceCreationFailed) |
Start listening. More... | |
size_t | size () const final |
Returns the number of faces in the channel. More... | |
Protected Member Functions | |
void | setDefaultMtu (size_t mtu) noexcept |
void | setUri (const FaceUri &uri) noexcept |
Class implementing an Ethernet-based channel to create faces.
Definition at line 43 of file ethernet-channel.hpp.
nfd::face::EthernetChannel::EthernetChannel | ( | shared_ptr< const ndn::net::NetworkInterface > | localEndpoint, |
time::nanoseconds | idleTimeout | ||
) |
Create an Ethernet channel on the given localEndpoint
(network interface).
To enable the creation of faces upon incoming connections, one needs to explicitly call listen().
Definition at line 40 of file ethernet-channel.cpp.
void nfd::face::EthernetChannel::connect | ( | const ethernet::Address & | remoteEndpoint, |
const FaceParams & | params, | ||
const FaceCreatedCallback & | onFaceCreated, | ||
const FaceCreationFailedCallback & | onConnectFailed | ||
) |
Create a unicast Ethernet face toward remoteEndpoint
.
Definition at line 52 of file ethernet-channel.cpp.
|
inlinenoexceptinherited |
Returns the default MTU for all faces created by this channel.
Definition at line 58 of file channel.hpp.
|
inlinenoexceptinherited |
Definition at line 49 of file channel.hpp.
|
inlinefinalvirtual |
Returns whether the channel is listening.
Implements nfd::face::Channel.
Definition at line 65 of file ethernet-channel.hpp.
void nfd::face::EthernetChannel::listen | ( | const FaceCreatedCallback & | onFaceCreated, |
const FaceCreationFailedCallback & | onFaceCreationFailed | ||
) |
Start listening.
Enable listening on the local endpoint, waiting for incoming frames, and creating a face when a frame is received from a new remote host.
Faces created in this way will have on-demand persistency.
onFaceCreated | Callback to notify successful creation of a face |
onFaceCreationFailed | Callback to notify errors |
Error |
Definition at line 74 of file ethernet-channel.cpp.
|
protectednoexceptinherited |
Definition at line 40 of file channel.cpp.
|
protectednoexceptinherited |
Definition at line 34 of file channel.cpp.
|
inlinefinalvirtual |
Returns the number of faces in the channel.
Implements nfd::face::Channel.
Definition at line 71 of file ethernet-channel.hpp.