22 #ifndef NDN_ASYNC_UNIX_TRANSPORT_HPP
23 #define NDN_ASYNC_UNIX_TRANSPORT_HPP
26 #include "../common.hpp"
27 #include "transport.hpp"
29 namespace boost {
namespace asio {
namespace local {
class stream_protocol; }}}
70 std::string filePath_;
120 send(
const uint8_t *data,
size_t dataLength);
140 ptr_lib::shared_ptr<AsyncSocketTransport<boost::asio::local::stream_protocol> >
An AsyncUnixTransport::ConnectionInfo extends Transport::ConnectionInfo to hold the file path of the ...
Definition: async-unix-transport.hpp:48
Definition: transport.hpp:32
AsyncSocketTransport is a helper template class for AsyncTcpTransport and AsyncUnixTransport to imple...
Definition: async-unix-transport.hpp:33
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
Copyright (C) 2015-2016 Regents of the University of California.
Definition: threadsafe-face.hpp:27
virtual void connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener, const OnConnected &onConnected)
Connect according to the info in connectionInfo, and use elementListener.
An ElementListener extends an ndn_ElementListener struct to proved an abstract virtual onReceivedElem...
Definition: element-listener.hpp:33
virtual void close()
Close the connection to the host.
virtual void processEvents()
Do nothing since the asio io_service reads the socket.
virtual bool isAsync()
Override to return true since connect needs to use the onConnected callback.
const std::string & getFilePath() const
Get the file path given to the constructor.
Definition: async-unix-transport.hpp:64
virtual void send(const uint8_t *data, size_t dataLength)
Send data to the host.
AsyncUnixTransport(boost::asio::io_service &ioService)
Create an AsyncUnixTransport in the unconnected state.
virtual bool isLocal(const Transport::ConnectionInfo &connectionInfo)
Determine whether this transport connecting according to connectionInfo is to a node on the current m...
ConnectionInfo(const char *filePath)
Create a ConnectionInfo with the given filePath.
Definition: async-unix-transport.hpp:54
A Transport::ConnectionInfo is a base class for connection information used by subclasses of Transpor...
Definition: transport.hpp:38
AsyncUnixTransport extends Transport for async communication over a Unix socket using Boost's asio io...
Definition: async-unix-transport.hpp:42