#include <tcp-transport.hpp>
Public Types | |
| typedef ptr_lib::function < void(const Block &wire)> | ReceiveCallback |
| typedef ptr_lib::function< void()> | ErrorCallback |
Public Member Functions | |
| TcpTransport (const std::string &host, const std::string &port="6363") | |
| ~TcpTransport () | |
| virtual void | connect (boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback) |
| Connect transport. More... | |
| virtual void | close () |
| Close the connection. More... | |
| virtual void | pause () |
| virtual void | resume () |
| virtual void | send (const Block &wire) |
| Set data to the host. More... | |
| virtual void | send (const Block &header, const Block &payload) |
| Alternative version of sending data, applying scatter/gather I/O concept. More... | |
| 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 |
Friends | |
| class | StreamTransportImpl< TcpTransport, boost::asio::ip::tcp > |
| class | StreamTransportWithResolverImpl< TcpTransport, boost::asio::ip::tcp > |
Definition at line 22 of file tcp-transport.hpp.
|
inherited |
Definition at line 26 of file transport.hpp.
|
inherited |
Definition at line 25 of file transport.hpp.
| ndn::TcpTransport::TcpTransport | ( | const std::string & | host, |
| const std::string & | port = "6363" |
||
| ) |
Definition at line 14 of file tcp-transport.cpp.
| ndn::TcpTransport::~TcpTransport | ( | ) |
Definition at line 20 of file tcp-transport.cpp.
|
virtual |
|
virtual |
Connect transport.
| If | connection cannot be established |
Reimplemented from ndn::Transport.
Definition at line 25 of file tcp-transport.cpp.
|
inlineinherited |
Definition at line 124 of file transport.hpp.
|
inlineinherited |
Definition at line 130 of file transport.hpp.
|
virtual |
Implements ndn::Transport.
Definition at line 58 of file tcp-transport.cpp.
|
inlineprotectedinherited |
Definition at line 136 of file transport.hpp.
|
virtual |
Implements ndn::Transport.
Definition at line 64 of file tcp-transport.cpp.
|
virtual |
Set data to the host.
| data | A pointer to the buffer of data to send. |
| dataLength | The number of bytes in data. |
Implements ndn::Transport.
Definition at line 40 of file tcp-transport.cpp.
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.
Implements ndn::Transport.
Definition at line 46 of file tcp-transport.cpp.
|
friend |
Definition at line 53 of file tcp-transport.hpp.
|
friend |
Definition at line 54 of file tcp-transport.hpp.
|
protectedinherited |
Definition at line 84 of file transport.hpp.
|
protectedinherited |
Definition at line 85 of file transport.hpp.
|
protectedinherited |
Definition at line 86 of file transport.hpp.
|
protectedinherited |
Definition at line 87 of file transport.hpp.