NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
g
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
f
i
k
l
n
o
p
s
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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