Determine whether this transport connecting according to connectionInfo is to a node on the current machine; results are cached.
According to http://redmine.named-data.net/projects/nfd/wiki/ScopeControl#local-face, TCP transports with a loopback address are local. If connectionInfo contains a host name, this will do a blocking DNS lookup; otherwise this will parse the IP address and examine the first octet to determine if it is a loopback address (e.g. the first IPv4 octet is 127 or IPv6 is "::1").
- Parameters
-
- Returns
- True if the host is local, false if not.
Reimplemented from ndn::Transport.
| void ndn::TcpTransport::processEvents |
( |
| ) |
|
|
virtual |
Process any data to receive.
For each element received, call elementListener.onReceivedElement. This is non-blocking and will return immediately if there is no data to receive. You should normally not call this directly since it is called by Face.processEvents.
- Exceptions
-
| This | may throw an exception for reading data or in the callback for processing the data. If you call this from an main event loop, you may want to catch and log/disregard all exceptions. |
Implements ndn::Transport.
| void ndn::TcpTransport::send |
( |
const uint8_t * |
data, |
|
|
size_t |
dataLength |
|
) |
| |
|
virtual |
Set data to the host.
- Parameters
-
| data | A pointer to the buffer of data to send. |
| dataLength | The number of bytes in data. |
Reimplemented from ndn::Transport.
The documentation for this class was generated from the following files: