#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 wire through the transport. 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 39 of file transport.hpp.
typedef function<void (const Block& wire)> ndn::Transport::ReceiveCallback |
Definition at line 49 of file transport.hpp.
typedef function<void ()> ndn::Transport::ErrorCallback |
Definition at line 50 of file transport.hpp.
|
inline |
Definition at line 114 of file transport.hpp.
|
inlinevirtual |
Definition at line 134 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 139 of file transport.hpp.
References m_ioService, and m_receiveCallback.
Referenced by ndn::TcpTransport::connect(), ndn::UnixTransport::connect(), and ndn::util::DummyClientFace::DummyClientFace().
|
pure virtual |
Close the connection.
Implemented in nfd::face::InternalClientTransport, 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 nfd::face::InternalClientTransport, ndn::UnixTransport, ndn::util::DummyClientFace::Transport, 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 nfd::face::InternalClientTransport, ndn::UnixTransport, ndn::util::DummyClientFace::Transport, and ndn::TcpTransport.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 147 of file transport.hpp.
References m_isConnected.
|
inline |
Definition at line 153 of file transport.hpp.
References m_isExpectingData.
|
inlineprotected |
Definition at line 159 of file transport.hpp.
References m_receiveCallback.
|
protected |
Definition at line 107 of file transport.hpp.
Referenced by connect(), and ndn::util::DummyClientFace::Transport::getIoService().
|
protected |
Definition at line 108 of file transport.hpp.
Referenced by isConnected().
|
protected |
Definition at line 109 of file transport.hpp.
Referenced by isExpectingData().
|
protected |
Definition at line 110 of file transport.hpp.
Referenced by connect(), ndn::util::DummyClientFace::Transport::receive(), and receive().