22 #ifndef NDN_CXX_TRANSPORT_UNIX_TRANSPORT_HPP
23 #define NDN_CXX_TRANSPORT_UNIX_TRANSPORT_HPP
27 #include <boost/asio/local/stream_protocol.hpp>
33 template<
typename BaseTransport,
typename Protocol>
34 class StreamTransportImpl;
66 static shared_ptr<UnixTransport>
67 create(
const std::string& uri);
71 getSocketNameFromUri(
const std::string& uri);
74 std::string m_unixSocket;
78 shared_ptr<Impl> m_impl;
Represents a TLV element of the NDN packet format.
Provides a "TLV-oriented" delivery service.
std::function< void(const Block &)> ReceiveCallback
A transport using Unix stream socket.
void resume() override
Resume the transport.
static shared_ptr< UnixTransport > create(const std::string &uri)
Create transport with parameters defined in URI.
void pause() override
Pause the transport, canceling all pending operations.
void send(const Block &wire) override
Send a TLV block through the transport.
~UnixTransport() override
void connect(boost::asio::io_service &ioService, ReceiveCallback receiveCallback) override
Asynchronously open the connection.
UnixTransport(const std::string &unixSocket)
void close() override
Close the connection.
Implementation detail of a Boost.Asio-based stream-oriented transport.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE