#include <transport.hpp>
Data Structures | |
| class | Error |
Public Types | |
| typedef ptr_lib::function < void(const Block &wire)> | ReceiveCallback |
| typedef ptr_lib::function< void()> | ErrorCallback |
Public Member Functions | |
| Transport () | |
| virtual | ~Transport () |
| virtual void | connect (boost::asio::io_service &io_service, const ReceiveCallback &receiveCallback) |
| Connect transport. More... | |
| virtual void | close ()=0 |
| Close the connection. More... | |
| virtual void | send (const Block &wire)=0 |
| Set data to the host. More... | |
| virtual void | send (const Block &header, const Block &payload)=0 |
| Alternative version of sending data, applying scatter/gather I/O concept. More... | |
| virtual void | pause ()=0 |
| virtual void | resume ()=0 |
| bool | isConnected () |
| bool | isExpectingData () |
Protected Member Functions | |
| void | receive (const Block &wire) |
Protected Attributes | |
| boost::asio::io_service * | m_ioService |
| bool | m_isConnected |
| bool | m_isExpectingData |
| ReceiveCallback | m_receiveCallback |
Definition at line 15 of file transport.hpp.
| typedef ptr_lib::function<void ()> ndn::Transport::ErrorCallback |
Definition at line 26 of file transport.hpp.
| typedef ptr_lib::function<void (const Block& wire)> ndn::Transport::ReceiveCallback |
Definition at line 25 of file transport.hpp.
|
inline |
Definition at line 91 of file transport.hpp.
|
inlinevirtual |
Definition at line 111 of file transport.hpp.
|
pure virtual |
Close the connection.
Implemented in ndn::UnixTransport, and ndn::TcpTransport.
|
inlinevirtual |
Connect transport.
| If | connection cannot be established |
Reimplemented in ndn::UnixTransport, and ndn::TcpTransport.
Definition at line 116 of file transport.hpp.
|
inline |
Definition at line 124 of file transport.hpp.
|
inline |
Definition at line 130 of file transport.hpp.
|
pure virtual |
Implemented in ndn::UnixTransport, and ndn::TcpTransport.
|
inlineprotected |
Definition at line 136 of file transport.hpp.
|
pure virtual |
Implemented in ndn::UnixTransport, and ndn::TcpTransport.
|
pure virtual |
Set data to the host.
| data | A pointer to the buffer of data to send. |
| dataLength | The number of bytes in data. |
Implemented in ndn::UnixTransport, and ndn::TcpTransport.
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.
Implemented in ndn::UnixTransport, and ndn::TcpTransport.
|
protected |
Definition at line 84 of file transport.hpp.
|
protected |
Definition at line 85 of file transport.hpp.
|
protected |
Definition at line 86 of file transport.hpp.
|
protected |
Definition at line 87 of file transport.hpp.