a transport using Unix stream socket
More...
#include <ndn-cxx/transport/unix-transport.hpp>
a transport using Unix stream socket
Definition at line 41 of file unix-transport.hpp.
ndn::UnixTransport::UnixTransport |
( |
const std::string & |
unixSocket | ) |
|
|
explicit |
ndn::UnixTransport::~UnixTransport |
( |
| ) |
|
|
overridedefault |
void ndn::UnixTransport::close |
( |
| ) |
|
|
overridevirtual |
void ndn::UnixTransport::connect |
( |
boost::asio::io_service & |
ioService, |
|
|
const ReceiveCallback & |
receiveCallback |
|
) |
| |
|
overridevirtual |
asynchronously open the connection
- Parameters
-
ioService | io_service to create socket on |
receiveCallback | callback function when a TLV block is received; must not be empty |
- Exceptions
-
boost::system::system_error | connection cannot be established |
Reimplemented from ndn::Transport.
Definition at line 76 of file unix-transport.cpp.
shared_ptr< UnixTransport > ndn::UnixTransport::create |
( |
const std::string & |
uri | ) |
|
|
static |
Create transport with parameters defined in URI.
- Exceptions
-
Definition at line 70 of file unix-transport.cpp.
bool ndn::Transport::isConnected |
( |
| ) |
const |
|
inlineinherited |
- Return values
-
true | connection has been established |
false | connection is not yet established or has been closed |
Definition at line 122 of file transport.hpp.
bool ndn::Transport::isReceiving |
( |
| ) |
const |
|
inlineinherited |
- Return values
-
true | incoming packets are expected, receiveCallback will be invoked |
false | incoming packets are not expected, receiveCallback will not be invoked |
Definition at line 128 of file transport.hpp.
void ndn::UnixTransport::pause |
( |
| ) |
|
|
overridevirtual |
pause the transport
- Postcondition
- receiveCallback will not be invoked
- Note
- This operation has no effect if transport has been paused, or when connection is being established.
Implements ndn::Transport.
Definition at line 114 of file unix-transport.cpp.
void ndn::Transport::receive |
( |
const Block & |
wire | ) |
|
|
inlineprotectedinherited |
void ndn::UnixTransport::resume |
( |
| ) |
|
|
overridevirtual |
resume the transport
- Postcondition
- receiveCallback will be invoked
- Note
- This operation has no effect if transport is not paused, or when connection is being established.
Implements ndn::Transport.
Definition at line 123 of file unix-transport.cpp.
void ndn::UnixTransport::send |
( |
const Block & |
wire | ) |
|
|
overridevirtual |
void ndn::UnixTransport::send |
( |
const Block & |
header, |
|
|
const Block & |
payload |
|
) |
| |
|
overridevirtual |
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 98 of file unix-transport.cpp.
boost::asio::io_service* ndn::Transport::m_ioService |
|
protectedinherited |
bool ndn::Transport::m_isConnected |
|
protectedinherited |
bool ndn::Transport::m_isReceiving |
|
protectedinherited |