listen_all


Description:

public bool listen_all (uint port, ServerListenOptions options) throws Error

Attempts to set up this to listen for connections on all interfaces on the system.

That is, it listens on the addresses `0.0.0.0` and/or `::`, depending on whether options includes soup_server_listen_ipv4_only, soup_server_listen_ipv6_only, or neither.) If port is specified, this will listen on that port. If it is 0, this will find an unused port to listen on. (In that case, you can use [method@Server.get_uris] to find out what port it ended up choosing.

See [method@Server.listen] for more details.

Parameters:

this

a Server

port

the port to listen on, or 0

options

listening options for this server

Returns:

true on success, false if port could not be bound or any other error occurred (in which case throws will be set).