22 #ifndef NDN_TRANSPORT_TCP_TRANSPORT_HPP 23 #define NDN_TRANSPORT_TCP_TRANSPORT_HPP 26 #include "../util/config-file.hpp" 28 #include <boost/asio/ip/tcp.hpp> 32 template<
typename BaseTransport,
typename Protocol>
33 class StreamTransportImpl;
35 template<
typename BaseTransport,
typename Protocol>
36 class StreamTransportWithResolverImpl;
44 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;
88 #endif // NDN_TRANSPORT_TCP_TRANSPORT_HPP Copyright (c) 2013-2017 Regents of the University of California.
void resume() override
resume the transport
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
void connect(boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback) override
asynchronously open the connection
Represents a TLV element of NDN packet format.
a transport using TCP socket
Implementation detail of a Boost.Asio-based stream-oriented transport.
void send(const Block &wire) override
send a TLV block through the transport
static shared_ptr< TcpTransport > create(const std::string &uri)
Create transport with parameters defined in URI.
implementation detail of a Boost.Asio-based stream-oriented transport with resolver support ...
provides TLV-block delivery service
void close() override
Close the connection.
TcpTransport(const std::string &host, const std::string &port="6363")
void pause() override
pause the transport
function< void(const Block &wire)> ReceiveCallback