#include <tcp-transport.hpp>
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) |
Send block of data from. More... | |
virtual void | send (const Block &header, const Block &payload) |
Alternative version of sending data, applying scatter/gather I/O concept. More... | |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE std::string | getDefaultSocketHostAndPort (const ConfigFile &config) |
Public Member Functions inherited from ndn::Transport | |
Transport () | |
virtual | ~Transport () |
bool | isConnected () |
bool | isExpectingData () |
Static Public Member Functions | |
static shared_ptr< TcpTransport > | create (const ConfigFile &config) |
Public Attributes | |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad0__: static std::pair<std::string |
Friends | |
class | StreamTransportImpl< TcpTransport, boost::asio::ip::tcp > |
class | StreamTransportWithResolverImpl< TcpTransport, boost::asio::ip::tcp > |
Additional Inherited Members | |
Public Types inherited from ndn::Transport | |
typedef function< void(const Block &wire)> | ReceiveCallback |
typedef function< void()> | ErrorCallback |
Protected Member Functions inherited from ndn::Transport | |
void | receive (const Block &wire) |
Protected Attributes inherited from ndn::Transport | |
boost::asio::io_service * | m_ioService |
bool | m_isConnected |
bool | m_isExpectingData |
ReceiveCallback | m_receiveCallback |
Definition at line 39 of file tcp-transport.hpp.
ndn::TcpTransport::TcpTransport | ( | const std::string & | host, |
const std::string & | port = "6363" |
||
) |
Definition at line 30 of file tcp-transport.cpp.
ndn::TcpTransport::~TcpTransport | ( | ) |
Definition at line 36 of file tcp-transport.cpp.
|
virtual |
Connect transport.
boost::system::system_error | if connection cannot be established |
Reimplemented from ndn::Transport.
Definition at line 80 of file tcp-transport.cpp.
References ndn::Transport::connect().
|
virtual |
|
virtual |
Implements ndn::Transport.
Definition at line 116 of file tcp-transport.cpp.
|
virtual |
Implements ndn::Transport.
Definition at line 124 of file tcp-transport.cpp.
|
virtual |
Send block of data from.
wire | through the transport |
wire | A block of data to send |
Implements ndn::Transport.
Definition at line 94 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 101 of file tcp-transport.cpp.
|
static |
Definition at line 41 of file tcp-transport.cpp.
References getDefaultSocketHostAndPort().
std::pair< std::string, std::string > ndn::TcpTransport::getDefaultSocketHostAndPort | ( | const ConfigFile & | config | ) |
Definition at line 48 of file tcp-transport.cpp.
References ndn::util::FaceUri::getHost(), ndn::ConfigFile::getParsedConfiguration(), ndn::util::FaceUri::getPort(), and ndn::util::FaceUri::getScheme().
Referenced by create().
|
friend |
Definition at line 78 of file tcp-transport.hpp.
|
friend |
Definition at line 79 of file tcp-transport.hpp.
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::TcpTransport::__pad0__ |
Definition at line 70 of file tcp-transport.hpp.