Skip to content

osal.ipaddr #

fn get #

fn get() !string

get returns the IP address of the current machine Returns an error if no IP address can be determined

fn get_or_resolve #

fn get_or_resolve(value string) !string

get_or_resolve returns the IP address - either the provided value or the current machine's IP if the value is a current machine keyword

fn is_current_machine_keyword #

fn is_current_machine_keyword(value string) bool

is_current_machine_keyword checks if the given value is a keyword indicating the current machine's IP should be used