listen_local


Description:

[ Version ( since = "2.48" ) ]
public bool listen_local (uint port, ServerListenOptions options) throws Error

This 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 IPV4_ONLY, 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 get_uris to find out what port it ended up choosing.)

See 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 error will be set).