NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::UnixStreamFactory Class Reference

#include <unix-stream-factory.hpp>

Inheritance diagram for nfd::UnixStreamFactory:
Collaboration diagram for nfd::UnixStreamFactory:

Classes

class  Error
 Exception of UnixStreamFactory. More...
 

Public Member Functions

shared_ptr< UnixStreamChannelcreateChannel (const std::string &unixSocketPath)
 Create stream-oriented Unix channel using specified socket path. More...
 
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. More...
 
virtual std::vector< shared_ptr< const Channel > > getChannels () const 1
 

Detailed Description

Definition at line 34 of file unix-stream-factory.hpp.

Member Function Documentation

§ createChannel()

shared_ptr< UnixStreamChannel > nfd::UnixStreamFactory::createChannel ( const std::string &  unixSocketPath)

Create stream-oriented Unix channel using specified socket path.

If this method is called twice with the same path, only one channel will be created. The second call will just retrieve the existing channel.

Returns
always a valid pointer to a UnixStreamChannel object, an exception will be thrown if the channel cannot be created.
Exceptions
UnixStreamFactory::Error

Definition at line 33 of file unix-stream-factory.cpp.

Referenced by nfd::UnixStreamFactory::Error::Error().

§ createFace()

void nfd::UnixStreamFactory::createFace ( const FaceUri uri,
ndn::nfd::FacePersistency  persistency,
const FaceCreatedCallback onCreated,
const FaceCreationFailedCallback onConnectFailed 
)
virtual

Try to create Face using the supplied FaceUri.

This method should automatically choose channel, based on supplied FaceUri and create face.

Exceptions
ErrorFactory does not support connect operation
Errorspecified persistency is not supported

Implements nfd::ProtocolFactory.

Definition at line 49 of file unix-stream-factory.cpp.

Referenced by nfd::UnixStreamFactory::Error::Error().

§ getChannels()

std::vector< shared_ptr< const Channel > > nfd::UnixStreamFactory::getChannels ( ) const
virtual

Implements nfd::ProtocolFactory.

Definition at line 58 of file unix-stream-factory.cpp.

Referenced by nfd::UnixStreamFactory::Error::Error().


The documentation for this class was generated from the following files: