NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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
30
Channel::~Channel
()
31
{
32
}
33
34
void
35
Channel::setUri
(
const
FaceUri
& uri)
36
{
37
m_uri = uri;
38
}
39
40
void
41
connectFaceClosedSignal
(
Face
&
face
,
const
std::function<
void
()>& f)
42
{
43
using
face::FaceState
;
44
45
face.
afterStateChange
.connect(
46
[f] (
FaceState
oldState,
FaceState
newState) {
47
if
(newState == FaceState::CLOSED) {
48
f();
49
}
50
});
51
}
52
53
}
// namespace nfd
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
ndn::util::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:44
channel.hpp
nfd::connectFaceClosedSignal
void connectFaceClosedSignal(Face &face, const std::function< void()> &f)
invokes a callback when the face is closed
Definition:
channel.cpp:41
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::face::FaceState
TransportState FaceState
indicates the state of a face
Definition:
face.hpp:54
face
nfd::face::Face::afterStateChange
signal::Signal< Transport, FaceState, FaceState > & afterStateChange
signals after face state changed
Definition:
face.hpp:166
nfd::Channel::setUri
void setUri(const FaceUri &uri)
Definition:
channel.cpp:35
nfd::Channel::~Channel
virtual ~Channel()
Definition:
channel.cpp:30
ndnSIM
NFD
daemon
face
channel.cpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13