forked from jbagg/QtZeroConf
add service txt record info to README.md
This commit is contained in:
12
README.md
12
README.md
@@ -44,7 +44,17 @@ QZeroConf zeroConf;
|
|||||||
```
|
```
|
||||||
It is recommend, but not required, that you connect a slot to QZeroConf's error() signal and servicePublished() signal.
|
It is recommend, but not required, that you connect a slot to QZeroConf's error() signal and servicePublished() signal.
|
||||||
|
|
||||||
3) Call startServicePublish() with the name, type, domain and port of your service.
|
3) If you want to add one or more txt records to the service, call
|
||||||
|
```c++
|
||||||
|
zeroConf.addServiceTxtRecord("name", "value");
|
||||||
|
```
|
||||||
|
or
|
||||||
|
```c++
|
||||||
|
zeroConf.addServiceTxtRecord("nameOnly");
|
||||||
|
```
|
||||||
|
before calling startServicePublish()
|
||||||
|
|
||||||
|
4) Call startServicePublish() with the name, type, domain and port of your service.
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
zeroConf.startServicePublish("Test", "_test._tcp", "local", 12345);
|
zeroConf.startServicePublish("Test", "_test._tcp", "local", 12345);
|
||||||
|
Reference in New Issue
Block a user