provides TLV-block delivery service
More...
#include <ndn-cxx/transport/transport.hpp>
provides TLV-block delivery service
Definition at line 35 of file transport.hpp.
| ndn::Transport::Transport |
( |
| ) |
|
| virtual ndn::Transport::~Transport |
( |
| ) |
|
|
virtualdefault |
| virtual void ndn::Transport::close |
( |
| ) |
|
|
pure virtual |
| void ndn::Transport::connect |
( |
boost::asio::io_service & |
ioService, |
|
|
const ReceiveCallback & |
receiveCallback |
|
) |
| |
|
virtual |
asynchronously open the connection
- Parameters
-
| ioService | io_service to create socket on |
| receiveCallback | callback function when a TLV block is received; must not be empty |
- Exceptions
-
| boost::system::system_error | connection cannot be established |
Reimplemented in ndn::TcpTransport, and ndn::UnixTransport.
Definition at line 44 of file transport.cpp.
| bool ndn::Transport::isConnected |
( |
| ) |
const |
|
inline |
- Return values
-
| true | connection has been established |
| false | connection is not yet established or has been closed |
Definition at line 123 of file transport.hpp.
| bool ndn::Transport::isReceiving |
( |
| ) |
const |
|
inline |
- Return values
-
| true | incoming packets are expected, receiveCallback will be invoked |
| false | incoming packets are not expected, receiveCallback will not be invoked |
Definition at line 129 of file transport.hpp.
| virtual void ndn::Transport::pause |
( |
| ) |
|
|
pure virtual |
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.
Implemented in ndn::TcpTransport, and ndn::UnixTransport.
| void ndn::Transport::receive |
( |
const Block & |
wire | ) |
|
|
inlineprotected |
| virtual void ndn::Transport::resume |
( |
| ) |
|
|
pure virtual |
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.
Implemented in ndn::TcpTransport, and ndn::UnixTransport.
| virtual void ndn::Transport::send |
( |
const Block & |
wire | ) |
|
|
pure virtual |
| virtual void ndn::Transport::send |
( |
const Block & |
header, |
|
|
const Block & |
payload |
|
) |
| |
|
pure virtual |
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).
Implemented in ndn::TcpTransport, and ndn::UnixTransport.
| boost::asio::io_service* ndn::Transport::m_ioService |
|
protected |
| bool ndn::Transport::m_isConnected |
|
protected |
| bool ndn::Transport::m_isReceiving |
|
protected |