Gio.Socket.prototype.listen

function listen(): Boolean {
    // Gjs wrapper for g_socket_listen()
}
  

Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using Gio.Socket.prototype.accept.

Before calling this the socket must be bound to a local address using Gio.Socket.prototype.bind.

To set the maximum amount of outstanding clients, use Gio.Socket.prototype.set_listen_backlog.

Since 2.22

Returns

true on success, false on error.