#include <unix-transport.hpp>
Definition at line 23 of file unix-transport.hpp.
| ndn::UnixTransport::UnixTransport |
( |
const std::string & |
unixSocket | ) |
|
Create Unix transport based on the socket specified in a well-known configuration file or fallback to /var/run/nfd.sock.
- Exceptions
-
| Throws | UnixTransport::Error on failure to parse a discovered configuration file |
Definition at line 16 of file unix-transport.cpp.
| ndn::UnixTransport::~UnixTransport |
( |
| ) |
|
| void ndn::UnixTransport::close |
( |
| ) |
|
|
virtual |
| void ndn::UnixTransport::connect |
( |
boost::asio::io_service & |
io_service, |
|
|
const ReceiveCallback & |
receiveCallback |
|
) |
| |
|
virtual |
| std::string ndn::UnixTransport::getDefaultSocketName |
( |
const ConfigFile & |
config | ) |
|
|
static |
Determine the default NFD unix socket.
- Returns
- unix_socket value if present in config, else /var/run/nfd.sock
- Exceptions
-
Definition at line 26 of file unix-transport.cpp.
| bool ndn::Transport::isConnected |
( |
| ) |
|
|
inlineinherited |
| bool ndn::Transport::isExpectingData |
( |
| ) |
|
|
inlineinherited |
| void ndn::UnixTransport::pause |
( |
| ) |
|
|
virtual |
| void ndn::Transport::receive |
( |
const Block & |
wire | ) |
|
|
inlineprotectedinherited |
| void ndn::UnixTransport::resume |
( |
| ) |
|
|
virtual |
| void ndn::UnixTransport::send |
( |
const Block & |
wire | ) |
|
|
virtual |
Set data to the host.
- Parameters
-
| data | A pointer to the buffer of data to send. |
| dataLength | The number of bytes in data. |
Implements ndn::Transport.
Definition at line 82 of file unix-transport.cpp.
| void ndn::UnixTransport::send |
( |
const Block & |
header, |
|
|
const Block & |
payload |
|
) |
| |
|
virtual |
Alternative version of sending data, applying scatter/gather I/O concept.
Two non-consecutive memory blocks will be send out together, e.g., as part of the same message in datagram-oriented transports.
Implements ndn::Transport.
Definition at line 88 of file unix-transport.cpp.
| boost::asio::io_service* ndn::Transport::m_ioService |
|
protectedinherited |
| bool ndn::Transport::m_isConnected |
|
protectedinherited |
| bool ndn::Transport::m_isExpectingData |
|
protectedinherited |