PySide6.QtNetwork.QDnsServiceRecord¶
- class QDnsServiceRecord¶
The
QDnsServiceRecord
class stores information about a DNS SRV record. More…Synopsis¶
Methods¶
def
__init__()
def
name()
def
port()
def
priority()
def
swap()
def
target()
def
timeToLive()
def
weight()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
When performing a lookup on a service, zero or more records will be returned. Each record is represented by a
QDnsServiceRecord
instance.The meaning of the fields is defined in RFC 2782 .
See also
- __init__()¶
Constructs an empty service record object.
- __init__(other)
- Parameters:
other –
QDnsServiceRecord
Constructs a copy of
other
.- name()¶
- Return type:
str
Returns the name for this record.
- port()¶
- Return type:
int
Returns the port on the target host for this service record.
- priority()¶
- Return type:
int
Returns the priority for this service record.
A client must attempt to contact the target host with the lowest-numbered priority.
- swap(other)¶
- Parameters:
other –
QDnsServiceRecord
Swaps this service record instance with
other
. This function is very fast and never fails.- target()¶
- Return type:
str
Returns the domain name of the target host for this service record.
- timeToLive()¶
- Return type:
int
Returns the duration in seconds for which this record is valid.
- weight()¶
- Return type:
int
Returns the weight for this service record.
The weight field specifies a relative weight for entries with the same priority. Entries with higher weights should be selected with a higher probability.