NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: 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
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::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 Sat Nov 12 2016 16:02:53 for ndnSIM by
1.8.12