listen_local


Description:

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

Attempts to set up this to listen for connections on "localhost".

That is, `127.0.0.1` and/or `::1`, 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 [[email protected]_uris] to find out what port it ended up choosing.

See [[email protected]] 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).




2022 vala-language.org