The underlying protocol and address used by a Face.
More...
#include <ndn-cxx/net/face-uri.hpp>
The underlying protocol and address used by a Face.
- See also
- https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#FaceUri
Definition at line 46 of file face-uri.hpp.
◆ CanonizeFailureCallback
◆ CanonizeSuccessCallback
◆ FaceUri() [1/7]
ndn::FaceUri::FaceUri |
( |
| ) |
|
|
default |
◆ FaceUri() [2/7]
ndn::FaceUri::FaceUri |
( |
const std::string & |
uri | ) |
|
|
explicit |
Construct by parsing from a string.
- Parameters
-
uri | scheme://host[:port]/path |
- Exceptions
-
Error | URI cannot be parsed |
Definition at line 49 of file face-uri.cpp.
◆ FaceUri() [3/7]
ndn::FaceUri::FaceUri |
( |
const char * |
uri | ) |
|
|
explicit |
Construct by parsing from a null-terminated string.
- Parameters
-
uri | scheme://host[:port]/path |
- Exceptions
-
Error | URI cannot be parsed |
- Note
- This overload is needed so that calls with a string literal won't be resolved to the boost::asio::local::stream_protocol::endpoint overload.
Definition at line 56 of file face-uri.cpp.
◆ FaceUri() [4/7]
ndn::FaceUri::FaceUri |
( |
const boost::asio::ip::udp::endpoint & |
endpoint | ) |
|
|
explicit |
◆ FaceUri() [5/7]
ndn::FaceUri::FaceUri |
( |
const boost::asio::ip::tcp::endpoint & |
endpoint | ) |
|
|
explicit |
◆ FaceUri() [6/7]
ndn::FaceUri::FaceUri |
( |
const boost::asio::ip::tcp::endpoint & |
endpoint, |
|
|
std::string_view |
scheme |
|
) |
| |
◆ FaceUri() [7/7]
◆ canCanonize()
bool ndn::FaceUri::canCanonize |
( |
const std::string & |
scheme | ) |
|
|
static |
Return whether a FaceUri of the specified scheme can be canonized.
Definition at line 600 of file face-uri.cpp.
◆ canonize()
Asynchronously convert this FaceUri to canonical form.
- Note
- A new FaceUri in canonical form will be created; this FaceUri is unchanged.
- Parameters
-
onSuccess | function to call after this FaceUri is converted to canonical form |
onFailure | function to call if this FaceUri cannot be converted to canonical form |
io | reference to boost::asio::io_context instance |
timeout | maximum allowable duration of the operations. It's intentional not to provide a default value: the caller should set a reasonable value in balance between network delay and user experience. |
Definition at line 617 of file face-uri.cpp.
◆ fromDev()
FaceUri ndn::FaceUri::fromDev |
( |
std::string_view |
ifname | ) |
|
|
static |
◆ fromFd()
FaceUri ndn::FaceUri::fromFd |
( |
int |
fd | ) |
|
|
static |
◆ fromUdpDev()
FaceUri ndn::FaceUri::fromUdpDev |
( |
const boost::asio::ip::udp::endpoint & |
endpoint, |
|
|
std::string_view |
ifname |
|
) |
| |
|
static |
Construct a udp4 or udp6 NIC-associated FaceUri from endpoint and network device name.
Definition at line 174 of file face-uri.cpp.
◆ getHost()
const std::string& ndn::FaceUri::getHost |
( |
| ) |
const |
|
inline |
◆ getPath()
const std::string& ndn::FaceUri::getPath |
( |
| ) |
const |
|
inline |
◆ getPort()
const std::string& ndn::FaceUri::getPort |
( |
| ) |
const |
|
inline |
◆ getScheme()
const std::string& ndn::FaceUri::getScheme |
( |
| ) |
const |
|
inline |
◆ isCanonical()
bool ndn::FaceUri::isCanonical |
( |
| ) |
const |
Determine whether this FaceUri is in canonical form.
- Returns
- true if this FaceUri is in canonical form, false if this FaceUri is not in canonical form or or it's undetermined whether this FaceUri is in canonical form
Definition at line 606 of file face-uri.cpp.
◆ parse()
bool ndn::FaceUri::parse |
( |
std::string_view |
uri | ) |
|
◆ toString()
std::string ndn::FaceUri::toString |
( |
| ) |
const |
◆ operator<
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const FaceUri & |
uri |
|
) |
| |
|
friend |
◆ operator==