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

#include <unix-transport.hpp>

Inheritance diagram for ndn::UnixTransport:
Collaboration diagram for ndn::UnixTransport:

Public Member Functions

 UnixTransport (const std::string &unixSocket)
 Create Unix transport based on the socket specified in a well-known configuration file or fallback to /var/run/nfd.sock. More...
 
 ~UnixTransport ()
 
virtual void connect (boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback)
 Connect transport. More...
 
virtual void close ()
 Close the connection. More...
 
virtual void pause ()
 
virtual void resume ()
 
virtual void send (const Block &wire)
 Send block of data from wire through the transport. More...
 
virtual void send (const Block &header, const Block &payload)
 Alternative version of sending data, applying scatter/gather I/O concept. More...
 
- Public Member Functions inherited from ndn::Transport
 Transport ()
 
virtual ~Transport ()
 
bool isConnected ()
 
bool isExpectingData ()
 

Static Public Member Functions

static shared_ptr< UnixTransportcreate (const ConfigFile &config)
 

Public Attributes

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE __pad0__: static std::string getDefaultSocketName(const ConfigFile& config)
 

Friends

class StreamTransportImpl< UnixTransport, boost::asio::local::stream_protocol >
 

Additional Inherited Members

- Public Types inherited from ndn::Transport
typedef function< void(const Block &wire)> ReceiveCallback
 
typedef function< void()> ErrorCallback
 
- Protected Member Functions inherited from ndn::Transport
void receive (const Block &wire)
 
- Protected Attributes inherited from ndn::Transport
boost::asio::io_service * m_ioService
 
bool m_isConnected
 
bool m_isExpectingData
 
ReceiveCallback m_receiveCallback
 

Detailed Description

Definition at line 38 of file unix-transport.hpp.

Constructor & Destructor Documentation

§ UnixTransport()

ndn::UnixTransport::UnixTransport ( const std::string &  unixSocket)

Create Unix transport based on the socket specified in a well-known configuration file or fallback to /var/run/nfd.sock.

Exceptions
ThrowsUnixTransport::Error on failure to parse a discovered configuration file

Definition at line 32 of file unix-transport.cpp.

§ ~UnixTransport()

ndn::UnixTransport::~UnixTransport ( )

Member Function Documentation

§ connect()

void ndn::UnixTransport::connect ( boost::asio::io_service &  io_service,
const ReceiveCallback receiveCallback 
)
virtual

Connect transport.

Exceptions
boost::system::system_errorif connection cannot be established

Reimplemented from ndn::Transport.

Definition at line 85 of file unix-transport.cpp.

References ndn::Transport::connect().

§ close()

void ndn::UnixTransport::close ( )
virtual

Close the connection.

Implements ndn::Transport.

Definition at line 112 of file unix-transport.cpp.

§ pause()

void ndn::UnixTransport::pause ( )
virtual

Implements ndn::Transport.

Definition at line 120 of file unix-transport.cpp.

§ resume()

void ndn::UnixTransport::resume ( )
virtual

Implements ndn::Transport.

Definition at line 128 of file unix-transport.cpp.

§ send() [1/2]

void ndn::UnixTransport::send ( const Block wire)
virtual

Send block of data from wire through the transport.

Parameters
wireA block of data to send

Implements ndn::Transport.

Definition at line 98 of file unix-transport.cpp.

§ send() [2/2]

void ndn::UnixTransport::send ( const Block header,
const Block payload 
)
virtual

Alternative version of sending data, applying scatter/gather I/O concept.

Two non-consecutive memory blocks will be send out together, e.g., as part of the same message in datagram-oriented transports.

Implements ndn::Transport.

Definition at line 105 of file unix-transport.cpp.

§ create()

shared_ptr< UnixTransport > ndn::UnixTransport::create ( const ConfigFile config)
static

Definition at line 79 of file unix-transport.cpp.

Friends And Related Function Documentation

§ StreamTransportImpl< UnixTransport, boost::asio::local::stream_protocol >

friend class StreamTransportImpl< UnixTransport, boost::asio::local::stream_protocol >
friend

Definition at line 89 of file unix-transport.hpp.

Member Data Documentation

§ __pad0__

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::UnixTransport::__pad0__

Definition at line 83 of file unix-transport.hpp.


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