SocketListener


Object Hierarchy:

Object hierarchy for SocketListener

Description:

[ CCode ( type_id = "g_socket_listener_get_type ()" ) ]
[ Version ( since = "2.22" ) ]
public class SocketListener : Object

A `GSocketListener` is an object that keeps track of a set of server sockets and helps you accept sockets from any of the socket, either sync or async.

Add addresses and ports to listen on using [method@Gio.SocketListener.add_address] and [method@Gio.SocketListener.add_inet_port]. These will be listened on until [method@Gio.SocketListener.close] is called. Dropping your final reference to the `GSocketListener` will not cause [method@Gio.SocketListener.close] to be called implicitly, as some references to the `GSocketListener` may be held internally.

If you want to implement a network server, also look at [class@Gio.SocketService] and [class@Gio.ThreadedSocketService] which are subclasses of `GSocketListener` that make this even easier.

All known sub-classes:

Namespace: GLib
Package: gio-2.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members: