NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
channel.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FACE_CHANNEL_HPP
27
#define NFD_DAEMON_FACE_CHANNEL_HPP
28
29
#include "
channel-log.hpp
"
30
#include "
face.hpp
"
31
32
namespace
nfd
{
33
namespace
face
{
34
35
class
Face
;
36
40
typedef
function<void(const shared_ptr<Face>& newFace)>
FaceCreatedCallback
;
41
44
typedef
function<void(uint32_t status, const std::string& reason)>
FaceCreationFailedCallback
;
45
52
class
Channel
: noncopyable
53
{
54
public
:
55
virtual
56
~Channel
();
57
58
const
FaceUri
&
59
getUri
()
const
60
{
61
return
m_uri;
62
}
63
66
virtual
bool
67
isListening
()
const
= 0;
68
71
virtual
size_t
72
size
()
const
= 0;
73
74
protected
:
75
void
76
setUri
(
const
FaceUri
& uri);
77
78
private
:
79
FaceUri
m_uri;
80
};
81
89
void
90
connectFaceClosedSignal
(
Face
&
face
,
const
std::function<
void
()>& f);
91
92
}
// namespace face
93
}
// namespace nfd
94
95
#endif // NFD_DAEMON_FACE_CHANNEL_HPP
face.hpp
nfd::face::Channel::setUri
void setUri(const FaceUri &uri)
Definition:
channel.cpp:34
nfd::face::Channel
represent a channel that communicates on a local endpoint
Definition:
channel.hpp:52
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
nfd::face::Channel::size
virtual size_t size() const =0
Returns the number of faces in the channel.
channel-log.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::face::Channel::isListening
virtual bool isListening() const =0
Returns whether the channel is listening.
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::face::Channel::getUri
const FaceUri & getUri() const
Definition:
channel.hpp:59
face
ndn::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:43
nfd::face::FaceCreationFailedCallback
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created.
Definition:
channel.hpp:44
nfd::face::FaceCreatedCallback
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
Definition:
channel.hpp:35
ndnSIM
NFD
daemon
face
channel.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11