NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
channel.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
channel.hpp
"
27
28
namespace
nfd
{
29
namespace
face
{
30
31
Channel::~Channel
() =
default
;
32
33
void
34
Channel::setUri
(
const
FaceUri
& uri)
35
{
36
m_uri = uri;
37
}
38
39
void
40
connectFaceClosedSignal
(
Face
&
face
,
const
std::function<
void
()>& f)
41
{
42
face
.afterStateChange.connect(
43
[f] (
FaceState
oldState,
FaceState
newState) {
44
if
(newState ==
FaceState::CLOSED
) {
45
f();
46
}
47
});
48
}
49
50
}
// namespace face
51
}
// namespace nfd
nfd::face::Channel::setUri
void setUri(const FaceUri &uri)
Definition:
channel.cpp:34
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
nfd::face::TransportState
TransportState
indicates the state of a transport
Definition:
transport.hpp:42
channel.hpp
nfd::face::Channel::~Channel
virtual ~Channel()
nfd::face::connectFaceClosedSignal
void connectFaceClosedSignal(Face &face, const std::function< void()> &f)
invokes a callback when the face is closed
Definition:
channel.cpp:40
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::face::TransportState::CLOSED
the transport is closed, and can be safely deallocated
face
ndn::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:44
ndnSIM
NFD
daemon
face
channel.cpp
Generated on Tue Aug 7 2018 16:19:17 for ndnSIM by
1.8.14