22 #ifndef NDN_CXX_TRANSPORT_TCP_TRANSPORT_HPP 
   23 #define NDN_CXX_TRANSPORT_TCP_TRANSPORT_HPP 
   27 #include <boost/asio/ip/tcp.hpp> 
   33 template<
typename BaseTransport, 
typename Protocol>
 
   34 class StreamTransportImpl;
 
   36 template<
typename BaseTransport, 
typename Protocol>
 
   37 class StreamTransportWithResolverImpl;
 
   47   TcpTransport(
const std::string& host, 
const std::string& port = 
"6363");
 
   69   static shared_ptr<TcpTransport>
 
   70   create(
const std::string& uri);
 
   73   static std::pair<std::string, std::string>
 
   74   getSocketHostAndPortFromUri(
const std::string& uri);
 
   83   shared_ptr<Impl> m_impl;
 
Represents a TLV element of the NDN packet format.
 
a transport using TCP socket
 
TcpTransport(const std::string &host, const std::string &port="6363")
 
void send(const Block &wire) override
Send a TLV block through the transport.
 
void pause() override
Pause the transport, canceling all pending operations.
 
static shared_ptr< TcpTransport > create(const std::string &uri)
Create transport with parameters defined in URI.
 
void close() override
Close the connection.
 
void resume() override
Resume the transport.
 
void connect(boost::asio::io_service &ioService, ReceiveCallback receiveCallback) override
Asynchronously open the connection.
 
Provides TLV-block delivery service.
 
std::function< void(const Block &wire)> ReceiveCallback
 
Implementation detail of a Boost.Asio-based stream-oriented transport.
 
implementation detail of a Boost.Asio-based stream-oriented transport with resolver support
 
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE