22 #ifndef NDN_TRANSPORT_TCP_TRANSPORT_HPP
23 #define NDN_TRANSPORT_TCP_TRANSPORT_HPP
26 #include "../util/config-file.hpp"
38 template<
typename BaseTransport,
typename Protocol>
39 class StreamTransportImpl;
41 template<
typename BaseTransport,
typename Protocol>
42 class StreamTransportWithResolverImpl;
50 TcpTransport(
const std::string& host,
const std::string& port =
"6363");
55 connect(boost::asio::io_service& ioService,
76 static shared_ptr<TcpTransport>
77 create(
const std::string& uri);
80 static std::pair<std::string, std::string>
81 getSocketHostAndPortFromUri(
const std::string& uri);
90 shared_ptr<Impl> m_impl;
95 #endif // NDN_TRANSPORT_TCP_TRANSPORT_HPP
Copyright (c) 2013-2016 Regents of the University of California.
void resume() override
resume the transport
Copyright (c) 2013-2016 Regents of the University of California.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
void connect(boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback) override
asynchronously open the connection
Class representing a wire element of NDN-TLV 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