Back to Seed Clases

Gio


Classes

Interfaces

Structs

Unions

Enums

Class Gio.SocketService

Import line: Gio = imports.gi.Gio;
GIR File: Gio-2.0.gir
C documentation: GSocketService
Class : SocketService
Extends: Gio.SocketListener
A GSocketService is an object that represents a service that is
provided to the network or over local sockets. When a new
connection is made to the service the GSocketService:incoming
signal is emitted.
A GSocketService is a subclass of GSocketListener and you need
to add the addresses you want to accept connections on to the
with the GSocketListener APIs.
There are two options for implementing a network service based on
GSocketService. The first is to create the service using
g_socket_service_new() and to connect to the GSocketService:incoming
signal. The second is to subclass GSocketService and override the
default signal handler implementation.
In either case, the handler must immediately return, or else it
will block additional incoming connections from being serviced.
If you are interested in writing connection handlers that contain
blocking code then see GThreadedSocketService.
The socket service runs on the main loop in the main thread, and is
not threadsafe in general. However, the calls to start and stop
the service are threadsafe so these can be used from threads that
handle incoming clients.
Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events - usage syntax: this.signals.EVENTNAME.connect( Function )
Event Defined By
Used by These Methods / Signals / Properties- Nowhere other than here
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:11:17 GMT+0800 (HKT)