PL::MdnsClient class
-
class MdnsClient : public PL::Lockable
mDNS client class
Public Functions
-
inline MdnsClient()
Creates an mDNS client.
-
virtual esp_err_t Lock(TickType_t timeout = portMAX_DELAY) override
Locks the object.
- Parameters:
timeout – timeout in FreeRTOS ticks
- Returns:
error code
-
virtual esp_err_t Unlock() override
Unlocks the object.
- Returns:
error code
-
esp_err_t DnsSdQuery(const std::string &type, const std::string &protocol, size_t maxNumberOfInstances, const std::string &instanceName, std::vector<MdnsServiceInstanceInfo> &serviceInstancesInfo)
Discovers services using a DNS-SD query.
- Parameters:
type – service type (_http, _ftp, etc)
protocol – service protocol (_tcp, _udp)
maxNumberOfInstances – maximum number of service instances to discover
instanceName – if not empty - only the services that contain this string in the name are returned
timeout – query timeout in FreeRTOS ticks
serviceInstancesInfo – discovered services
- Returns:
error code
-
TickType_t GetReadTimeout()
Gets the read operation timeout.
- Returns:
timeout in FreeRTOS ticks
-
esp_err_t SetReadTimeout(TickType_t timeout)
Sets the read operation timeout.
- Parameters:
timeout – timeout in FreeRTOS ticks
- Returns:
error code
Public Static Attributes
-
static const TickType_t defaultReadTimeout = 300 / portTICK_PERIOD_MS
Default read operation timeout in FreeRTOS ticks.
-
inline MdnsClient()