Encoded DNS name.
More...
#include <Name.h>
Encoded DNS name.
mDNS-SD names are represented as instance.service.domain. See https://tools.ietf.org/html/rfc6763#section-4.1
Instance names should be friendly and not attempt to be unique. See https://tools.ietf.org/html/rfc6763#appendix-D
Example: "UDP Server._http._tcp.local" instance: "UDP Server" service: "_http._tcp" name: "http" protocol: Protocol::Tcp domain: "local"
◆ Name()
mDNS::Name::Name |
( |
Message & |
message, |
|
|
uint16_t |
ptr |
|
) |
| |
|
inline |
◆ equalsIgnoreCase() [1/2]
bool mDNS::Name::equalsIgnoreCase |
( |
const char * |
str, |
|
|
size_t |
length |
|
) |
| const |
◆ equalsIgnoreCase() [2/2]
bool mDNS::Name::equalsIgnoreCase |
( |
const String & |
value | ) |
const |
|
inline |
◆ fixup()
bool mDNS::Name::fixup |
( |
const Name & |
other | ) |
|
Fixup pointer at end of name to point to another name.
- Parameters
-
- Return values
-
bool | true on success, false if name does not end with a pointer |
◆ getDataLength()
uint16_t mDNS::Name::getDataLength |
( |
| ) |
const |
Get number of bytes occupied by the name Not the same as the string length because content is encoded.
◆ getDomain()
Name mDNS::Name::getDomain |
( |
| ) |
const |
Get the last element of the name, which must be the domain.
- Return values
-
Name | This Result
"UDP Server._http._tcp.local" "local" "UDP Server._http._tcp.my.domain.local" "my.domain.local" |
◆ getMessage()
Message& mDNS::Name::getMessage |
( |
| ) |
const |
|
inline |
◆ getProtocol()
Name mDNS::Name::getProtocol |
( |
| ) |
const |
Get the service name.
- Return values
-
Name | This Result
"UDP Server._http._tcp.local" "_tcp.local" |
◆ getPtr()
uint16_t mDNS::Name::getPtr |
( |
| ) |
const |
|
inline |
◆ getService()
Name mDNS::Name::getService |
( |
| ) |
const |
Get the service name.
- Return values
-
Name | This Result
"UDP Server._http._tcp.local" "_http._tcp.local" |
◆ makePointer()
uint16_t mDNS::Name::makePointer |
( |
| ) |
const |
Ensure a pointer refers to actual content, not another pointer.
◆ operator String()
mDNS::Name::operator String |
( |
| ) |
const |
|
inline |
◆ operator!=()
◆ operator==()
bool mDNS::Name::operator== |
( |
const String & |
value | ) |
const |
|
inline |
◆ toString()
String mDNS::Name::toString |
( |
| ) |
const |
◆ maxLength
constexpr size_t mDNS::Name::maxLength {256} |
|
staticconstexpr |
The documentation for this class was generated from the following file: