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
Classes
Files
File List
File Members
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
struct
Error
:
public
ProtocolFactory::Error
41
{
42
Error
(
const
std::string& what) :
ProtocolFactory
::
Error
(what) {}
43
};
44
57
shared_ptr<UnixStreamChannel>
58
createChannel
(
const
std::string& unixSocketPath);
59
60
// from Factory
61
62
virtual
void
63
createFace
(
const
FaceUri
& uri,
64
ndn::nfd::FacePersistency
persistency,
65
const
FaceCreatedCallback
& onCreated,
66
const
FaceConnectFailedCallback
& onConnectFailed)
DECL_OVERRIDE
;
67
68
virtual
std::list<shared_ptr<const Channel> >
69
getChannels
()
const
;
70
71
private
:
80
shared_ptr<UnixStreamChannel>
81
findChannel(
const
unix_stream::Endpoint
& endpoint);
82
83
private
:
84
typedef
std::map< unix_stream::Endpoint, shared_ptr<UnixStreamChannel> > ChannelMap;
85
ChannelMap m_channels;
86
};
87
88
}
// namespace nfd
89
90
#endif // NFD_DAEMON_FACE_UNIX_STREAM_FACTORY_HPP
nfd::FaceConnectFailedCallback
function< void(const std::string &reason)> FaceConnectFailedCallback
Prototype for the callback that is called when face is failed to get created.
Definition:
protocol-factory.hpp:47
nfd::UnixStreamFactory::Error::Error
Error(const std::string &what)
Definition:
unix-stream-factory.hpp:42
nfd::UnixStreamFactory::getChannels
virtual std::list< shared_ptr< const Channel > > getChannels() const
Definition:
unix-stream-factory.cpp:68
ndn::util::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:44
nfd::UnixStreamFactory::Error
Exception of UnixStreamFactory.
Definition:
unix-stream-factory.hpp:40
protocol-factory.hpp
unix-stream-channel.hpp
DECL_OVERRIDE
#define DECL_OVERRIDE
expands to 'override' if compiler supports this feature, otherwise expands to nothing ...
Definition:
common.hpp:49
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
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
Definition:
protocol-factory.hpp:50
nfd::ProtocolFactory::Error
Base class for all exceptions thrown by channel factories.
Definition:
protocol-factory.hpp:56
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:48
nfd::UnixStreamFactory
Definition:
unix-stream-factory.hpp:34
nfd::FaceCreatedCallback
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback called when face is created (as a response to incoming connection or after...
Definition:
protocol-factory.hpp:34
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 FaceConnectFailedCallback &onConnectFailed) 1
Try to create Face using the supplied FaceUri.
Definition:
unix-stream-factory.cpp:59
ndnSIM
NFD
daemon
face
unix-stream-factory.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11