Gio.SocketListener

const Gio = imports.gi.Gio;

let socketListener = new Gio.SocketListener({
    listen_backlog: value,
});
  

A Gio.SocketListener 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.

If you want to implement a network server, also look at Gio.SocketService and Gio.ThreadedSocketService which are subclass of Gio.SocketListener that makes this even easier.

Since 2.22

Hierarchy

  • GObject.Object
    • Gio.SocketListener