AFL.automation.shared.ServerDiscovery#
Classes
|
Used to browse for a service for specific type(s). |
|
An async version of ServiceInfo. |
|
Implementation of Zeroconf Multicast DNS Service Discovery |
|
An async version of ZeroconfServiceTypes. |
|
|
|
|
ServerDiscovery class |
|
|
Used to browse for a service of a specific type. |
|
Service information. |
|
|
|
Implementation of Zeroconf Multicast DNS Service Discovery |
- class AFL.automation.shared.ServerDiscovery.RunThread(coro)[source]#
- __init__(coro)[source]#
This constructor should always be called with keyword arguments. Arguments are:
group should be None; reserved for future extension when a ThreadGroup class is implemented.
target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.
name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.
args is a list or tuple of arguments for the target invocation. Defaults to ().
kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.
If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
- run()[source]#
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
- class AFL.automation.shared.ServerDiscovery.ServerDiscovery[source]#
ServerDiscovery class
This class is used to discover AFL servers on the network using zeroconf requests that match a particular specification.
- on_service_state_change(zeroconf: Zeroconf, service_type: str, name: str, state_change: ServiceStateChange) → None[source]#
- discover_server_by_name(service_name)[source]#
Does a zeroconf request to find a named AFL-automation server on the network.
Returns a tuple of (hostname:port string,ServiceInfo object) if found, None if not found.
- async classmethod sa_aio_discover_server_by_name(service_name)[source]#
Does a zeroconf request to find a named AFL-automation server on the network.
Returns a tuple of (hostname:port string,ServiceInfo object) if found, None if not found.
- classmethod sa_discover_server_by_name(service_name)[source]#
Does a zeroconf request to find a named AFL-automation server on the network.
Returns a tuple of (hostname:port string,ServiceInfo object) if found, None if not found.
- find_server_by_name(service_name)[source]#
Disambiguator for either matching or discovering a specific server by name
- match_server_by_name(service_name)[source]#
Looks through the registry of discovered services for an exact name match. Returns a tuple of (hostname:port string,ServiceInfo object) if found, None if not found.