NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
unix-stream-factory.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FACE_UNIX_STREAM_FACTORY_HPP
27
#define NFD_DAEMON_FACE_UNIX_STREAM_FACTORY_HPP
28
29
#include "
protocol-factory.hpp
"
30
#include "
unix-stream-channel.hpp
"
31
32
namespace
nfd
{
33
34
class
UnixStreamFactory
:
public
ProtocolFactory
35
{
36
public
:
40
class
Error
:
public
ProtocolFactory::Error
41
{
42
public
:
43
explicit
44
Error
(
const
std::string& what)
45
:
ProtocolFactory
::
Error
(what)
46
{
47
}
48
};
49
62
shared_ptr<UnixStreamChannel>
63
createChannel
(
const
std::string& unixSocketPath);
64
65
public
:
// from ProtocolFactory
66
virtual
void
67
createFace
(
const
FaceUri
& uri,
68
ndn::nfd::FacePersistency
persistency,
69
const
FaceCreatedCallback
& onCreated,
70
const
FaceCreationFailedCallback
& onConnectFailed)
DECL_OVERRIDE
;
71
72
virtual
std::vector<shared_ptr<const Channel>>
73
getChannels
()
const
DECL_OVERRIDE
;
74
75
private
:
82
shared_ptr<UnixStreamChannel>
83
findChannel(
const
unix_stream::Endpoint
& endpoint)
const
;
84
85
private
:
86
std::map<unix_stream::Endpoint, shared_ptr<UnixStreamChannel>> m_channels;
87
};
88
89
}
// namespace nfd
90
91
#endif // NFD_DAEMON_FACE_UNIX_STREAM_FACTORY_HPP
nfd::FaceCreationFailedCallback
function< void(const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when the face fails to be created.
Definition:
channel.hpp:44
nfd::ProtocolFactory::Error
Base class for all exceptions thrown by protocol factories.
Definition:
protocol-factory.hpp:43
ndn::util::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:44
nfd::UnixStreamFactory::Error::Error
Error(const std::string &what)
Definition:
unix-stream-factory.hpp:44
protocol-factory.hpp
nfd::UnixStreamFactory::Error
Exception of UnixStreamFactory.
Definition:
unix-stream-factory.hpp:40
unix-stream-channel.hpp
DECL_OVERRIDE
#define DECL_OVERRIDE
expands to 'override' if compiler supports 'override' specifier, otherwise expands to nothing ...
Definition:
common.hpp:50
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:49
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::UnixStreamFactory::createChannel
shared_ptr< UnixStreamChannel > createChannel(const std::string &unixSocketPath)
Create stream-oriented Unix channel using specified socket path.
Definition:
unix-stream-factory.cpp:33
nfd::ProtocolFactory
Abstract base class for all protocol factories.
Definition:
protocol-factory.hpp:37
nfd::UnixStreamFactory
Definition:
unix-stream-factory.hpp:34
nfd::UnixStreamFactory::getChannels
virtual std::vector< shared_ptr< const Channel > > getChannels() const 1
Definition:
unix-stream-factory.cpp:58
nfd::FaceCreatedCallback
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when the face is created (as a response to incoming connec...
Definition:
channel.hpp:38
nfd::unix_stream::Endpoint
boost::asio::local::stream_protocol::endpoint Endpoint
Definition:
unix-stream-channel.hpp:33
nfd::UnixStreamFactory::createFace
virtual void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onConnectFailed) 1
Try to create Face using the supplied FaceUri.
Definition:
unix-stream-factory.cpp:49
ndnSIM
NFD
daemon
face
unix-stream-factory.hpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12