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;
68 static shared_ptr<UnixTransport>
69 create(
const std::string& uri);
73 getSocketNameFromUri(
const std::string& uri);
76 std::string m_unixSocket;
80 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 that uses a Unix stream socket for communication.
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
UnixTransport(const std::string &unixSocket)
void connect(boost::asio::io_context &ioCtx, ReceiveCallback receiveCallback) override
Asynchronously open the connection.
void close() override
Close the connection.
Implementation detail of a Boost.Asio-based stream-oriented transport.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE