#include <transport.hpp>
Classes | |
class | Error |
Public Types | |
typedef function< void(const Block &wire)> | ReceiveCallback |
typedef 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 |
Send block of data from. 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 32 of file transport.hpp.
typedef function<void (const Block& wire)> ndn::Transport::ReceiveCallback |
Definition at line 42 of file transport.hpp.
typedef function<void ()> ndn::Transport::ErrorCallback |
Definition at line 43 of file transport.hpp.
|
inline |
Definition at line 107 of file transport.hpp.
|
inlinevirtual |
Definition at line 127 of file transport.hpp.
|
inlinevirtual |
Connect transport.
boost::system::system_error | if connection cannot be established |
Reimplemented in ndn::UnixTransport, and ndn::TcpTransport.
Definition at line 132 of file transport.hpp.
References m_ioService, and m_receiveCallback.
Referenced by ndn::TcpTransport::connect(), and ndn::UnixTransport::connect().
|
pure virtual |
Close the connection.
Implemented in ndn::UnixTransport, ndn::TcpTransport, and ndn::util::DummyClientFace::Transport.
|
pure virtual |
Send block of data from.
wire | through the transport |
wire | A block of data to send |
Implemented in ndn::UnixTransport, ndn::TcpTransport, and ndn::util::DummyClientFace::Transport.
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, ndn::util::DummyClientFace::Transport, and ndn::TcpTransport.
|
pure virtual |
Implemented in ndn::UnixTransport, ndn::TcpTransport, and ndn::util::DummyClientFace::Transport.
|
pure virtual |
Implemented in ndn::UnixTransport, ndn::TcpTransport, and ndn::util::DummyClientFace::Transport.
|
inline |
Definition at line 140 of file transport.hpp.
References m_isConnected.
|
inline |
Definition at line 146 of file transport.hpp.
References m_isExpectingData.
|
inlineprotected |
Definition at line 152 of file transport.hpp.
References m_receiveCallback.
|
protected |
Definition at line 100 of file transport.hpp.
Referenced by connect(), and ndn::util::DummyClientFace::Transport::getIoService().
|
protected |
Definition at line 101 of file transport.hpp.
Referenced by isConnected().
|
protected |
Definition at line 102 of file transport.hpp.
Referenced by isExpectingData().
|
protected |
Definition at line 103 of file transport.hpp.
Referenced by connect(), ndn::util::DummyClientFace::Transport::receive(), and receive().