- class pxblat.ClientThread(threading.Thread)[source]
A class for managing client connections to a server in a separate thread.
This class can be used to query a gfServer in a separate thread, and can optionally wait until the server is ready before sending a query. It can also parse the result of the query.
- wait_ready¶
Whether to wait until the server is ready before sending a query. Defaults to False.
- wait_timeout¶
The number of seconds to wait for the server to be ready. Defaults to 60.
- server_option¶
The server options to use if a server is not provided. Defaults to None.
- Type:¶
ServerOption, optional
- result¶
The result of the query, or None if the query has not yet been sent or the result has not yet been received.
Constructors¶
-
ClientThread(option: ClientOption, host: str | None =
None, ...)[source] A class for querying a gfServer using a separate thread.
Public members¶
- property host
The hostname or IP address of the server.
- property port
The port number of the server.
- classmethod create_option()[source]
Creates a new ClientOption object with default values.
- start()
Start the thread’s activity.
- property name
A string used for identification purposes only.
- property ident
Thread identifier of this thread or None if it has not been started.
- property native_id
Native integral thread ID of this thread, or None if it has not been started.
- is_alive()
Return whether the thread is alive.
- property daemon
A boolean value indicating whether this thread is a daemon thread.
- isDaemon()
Return whether this thread is a daemon.
- getName()
Return a string used for identification purposes only.
String representation¶
- __repr__()
Return repr(self).