NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::util::DummyClientFace::Transport Class Reference
Inheritance diagram for ndn::util::DummyClientFace::Transport:
Collaboration diagram for ndn::util::DummyClientFace::Transport:

Public Member Functions

void receive (Block block) const
 
void close () override
 Close the connection. More...
 
void pause () override
 pause the transport More...
 
void resume () override
 resume the transport More...
 
void send (const Block &wire) override
 send a TLV block through the transport More...
 
void send (const Block &header, const Block &payload) override
 send two memory blocks through the transport More...
 
boost::asio::io_service & getIoService ()
 
- Public Member Functions inherited from ndn::Transport
 Transport ()
 
virtual ~Transport ()=default
 
virtual void connect (const ReceiveCallback &receiveCallback)
 asynchronously open the connection More...
 
bool isConnected () const
 
bool isReceiving () const
 

Public Attributes

Signal< Transport, BlockonSendBlock
 

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)
 invoke the receive callback More...
 
- Protected Attributes inherited from ndn::Transport
bool m_isConnected
 
bool m_isReceiving
 
ReceiveCallback m_receiveCallback
 

Detailed Description

Definition at line 35 of file dummy-client-face.cpp.

Member Function Documentation

◆ receive()

void ndn::util::DummyClientFace::Transport::receive ( Block  block) const
inline

◆ close()

void ndn::util::DummyClientFace::Transport::close ( )
inlineoverridevirtual

Close the connection.

Implements ndn::Transport.

Definition at line 48 of file dummy-client-face.cpp.

◆ pause()

void ndn::util::DummyClientFace::Transport::pause ( )
inlineoverridevirtual

pause the transport

Postcondition
receiveCallback will not be invoked
Note
This operation has no effect if transport has been paused, or when connection is being established.

Implements ndn::Transport.

Definition at line 53 of file dummy-client-face.cpp.

◆ resume()

void ndn::util::DummyClientFace::Transport::resume ( )
inlineoverridevirtual

resume the transport

Postcondition
receiveCallback will be invoked
Note
This operation has no effect if transport is not paused, or when connection is being established.

Implements ndn::Transport.

Definition at line 58 of file dummy-client-face.cpp.

◆ send() [1/2]

void ndn::util::DummyClientFace::Transport::send ( const Block wire)
inlineoverridevirtual

send a TLV block through the transport

Implements ndn::Transport.

Definition at line 63 of file dummy-client-face.cpp.

References onSendBlock.

Referenced by send().

◆ send() [2/2]

void ndn::util::DummyClientFace::Transport::send ( const Block header,
const Block payload 
)
inlineoverridevirtual

send two memory blocks through the transport

Scatter/gather API is utilized to send two non-consecutive memory blocks together (as part of the same message in datagram-oriented transports).

Implements ndn::Transport.

Definition at line 69 of file dummy-client-face.cpp.

References ndn::encoding::Encoder::appendByteArray(), send(), ndn::Block::size(), and ndn::Block::wire().

◆ getIoService()

boost::asio::io_service& ndn::util::DummyClientFace::Transport::getIoService ( )
inline

Definition at line 79 of file dummy-client-face.cpp.

Member Data Documentation

◆ onSendBlock

Signal<Transport, Block> ndn::util::DummyClientFace::Transport::onSendBlock

Definition at line 85 of file dummy-client-face.cpp.

Referenced by send().


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