ThreadedSocketService


Object Hierarchy:

Object hierarchy for ThreadedSocketService

Description:

[ CCode ( type_id = "g_threaded_socket_service_get_type ()" ) ]
[ Version ( since = "2.22" ) ]
public class ThreadedSocketService : SocketService

A `GThreadedSocketService` is a simple subclass of [class@Gio.

SocketService] that handles incoming connections by creating a worker thread and dispatching the connection to it by emitting the [ signal@Gio.ThreadedSocketService:GThreadedSocketService:run signal] in the new thread.

The signal handler may perform blocking I/O and need not return until the connection is closed.

The service is implemented using a thread pool, so there is a limited amount of threads available to serve incoming requests. The service automatically stops the [class@Gio.SocketService] from accepting new connections when all threads are busy.

As with [class@Gio.SocketService], you may connect to [signal@Gio.ThreadedSocketService:GThreadedSocketService:run], or subclass and override the default handler.


Namespace: GLib
Package: gio-2.0

Content:

Properties:

Creation methods:

Signals:

Inherited Members:

All known members inherited from class GLib.SocketService