a transport using Unix stream socket More...
#include <unix-transport.hpp>
Public Member Functions | |
UnixTransport (const std::string &unixSocket) | |
~UnixTransport () | |
virtual void | connect (boost::asio::io_service &ioService, const ReceiveCallback &receiveCallback) override |
asynchronously open the connection More... | |
virtual void | close () override |
Close the connection. More... | |
virtual void | pause () override |
pause the transport More... | |
virtual void | resume () override |
resume the transport More... | |
virtual void | send (const Block &wire) override |
send a TLV block through the transport More... | |
virtual void | send (const Block &header, const Block &payload) override |
send two memory blocks through the transport More... | |
Public Member Functions inherited from ndn::Transport | |
Transport () | |
virtual | ~Transport ()=default |
bool | isConnected () const |
bool | isReceiving () const |
Static Public Member Functions | |
static shared_ptr< UnixTransport > | create (const std::string &uri) |
Create transport with parameters defined in URI. More... | |
Public Attributes | |
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad0__: static std::string getSocketNameFromUri(const std::string& uri) |
Friends | |
class | StreamTransportImpl< UnixTransport, boost::asio::local::stream_protocol > |
Additional Inherited Members | |
Public Types inherited from ndn::Transport | |
typedef function< void(const Block &wire)> | ReceiveCallback |
typedef function< void()> | ErrorCallback |
Protected Member Functions inherited from ndn::Transport | |
void | receive (const Block &wire) |
invoke the receive callback More... | |
Protected Attributes inherited from ndn::Transport | |
boost::asio::io_service * | m_ioService |
bool | m_isConnected |
bool | m_isReceiving |
ReceiveCallback | m_receiveCallback |
a transport using Unix stream socket
Definition at line 43 of file unix-transport.hpp.
|
explicit |
Definition at line 30 of file unix-transport.cpp.
ndn::UnixTransport::~UnixTransport | ( | ) |
Definition at line 35 of file unix-transport.cpp.
References ndn::util::FaceUri::getPath(), and ndn::util::FaceUri::getScheme().
|
overridevirtual |
asynchronously open the connection
ioService | io_service to create socket on |
receiveCallback | callback function when a TLV block is received; must not be empty |
boost::system::system_error | connection cannot be established |
Reimplemented from ndn::Transport.
Definition at line 75 of file unix-transport.cpp.
References ndn::Transport::connect().
|
overridevirtual |
|
overridevirtual |
pause the transport
Implements ndn::Transport.
Definition at line 110 of file unix-transport.cpp.
|
overridevirtual |
resume the transport
Implements ndn::Transport.
Definition at line 118 of file unix-transport.cpp.
|
overridevirtual |
send a TLV block through the transport
Implements ndn::Transport.
Definition at line 88 of file unix-transport.cpp.
send two memory blocks through the transport
Scatter/gather API is utilized to send two non-consecutive memory blocks together (as part of the same message in datagram-oriented transports).
Implements ndn::Transport.
Definition at line 95 of file unix-transport.cpp.
|
static |
Create transport with parameters defined in URI.
Transport::Error | if incorrect URI or unsupported protocol is specified |
Definition at line 69 of file unix-transport.cpp.
|
friend |
Definition at line 84 of file unix-transport.hpp.
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::UnixTransport::__pad0__ |
Definition at line 78 of file unix-transport.hpp.