Socket.listen

bool listen()

Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using [gio.socket.Socket.accept].

Before calling this the socket must be bound to a local address using [gio.socket.Socket.bind].

To set the maximum amount of outstanding clients, use [gio.socket.Socket.setListenBacklog].

Returns

true on success, false on error.

Throws

[ErrorWrap]