22 #ifndef NDN_TRANSPORT_TCP_TRANSPORT_HPP 23 #define NDN_TRANSPORT_TCP_TRANSPORT_HPP 28 #include <boost/asio/ip/tcp.hpp> 34 template<
typename BaseTransport,
typename Protocol>
35 class StreamTransportImpl;
37 template<
typename BaseTransport,
typename Protocol>
38 class StreamTransportWithResolverImpl;
48 TcpTransport(
const std::string& host,
const std::string& port =
"6363");
53 connect(boost::asio::io_service& ioService,
const ReceiveCallback& receiveCallback)
override;
65 send(
const Block& wire)
override;
68 send(
const Block& header,
const Block& payload)
override;
73 static shared_ptr<TcpTransport>
74 create(
const std::string& uri);
77 static std::pair<std::string, std::string>
78 getSocketHostAndPortFromUri(
const std::string& uri);
87 shared_ptr<Impl> m_impl;
92 #endif // NDN_TRANSPORT_TCP_TRANSPORT_HPP
Represents a TLV element of NDN packet format.
a transport using TCP socket
Implementation detail of a Boost.Asio-based stream-oriented transport.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
provides TLV-block delivery service
implementation detail of a Boost.Asio-based stream-oriented transport with resolver support ...
function< void(const Block &wire)> ReceiveCallback