ThreadedSocketService

Added in version 2.22.

class ThreadedSocketService(**properties: Any)

Superclasses: SocketService, SocketListener, Object

Constructors:

ThreadedSocketService(**properties)
new(max_threads:int) -> Gio.SocketService

Constructors

class ThreadedSocketService
classmethod new(max_threads: int) SocketService

Creates a new ThreadedSocketService with no listeners. Listeners must be added with one of the SocketListener “add” methods.

Added in version 2.22.

Parameters:

max_threads – the maximal number of threads to execute concurrently handling incoming clients, -1 means no limit

Properties

class ThreadedSocketService
props.max_threads: int

The maximum number of threads handling clients for this service.

Added in version 2.22.

Signals

class ThreadedSocketService.signals
run(connection: SocketConnection, source_object: Object | None = None) bool

The ::run signal is emitted in a worker thread in response to an incoming connection. This thread is dedicated to handling connection and may perform blocking IO. The signal handler need not return until the connection is closed.

Parameters:

Virtual Methods

class ThreadedSocketService
do_run(connection: SocketConnection, source_object: Object) bool
Parameters:
  • connection

  • source_object

Fields

class ThreadedSocketService
parent_instance
priv