Skip to main content

resolve_stated_server

Function resolve_stated_server 

Source
pub fn resolve_stated_server(stated: &str, assume_tls: bool) -> Option<Server>
Expand description

The server the mariner stated by hand, resolved to something dialable.

None when the address is empty or names nothing this machine can reach. A caller should report that the same way a silent mDNS browse is reported (“no server answered”): from the chart’s point of view it is the same thing, nowhere to get a position from.

assume_tls is what a bare address (no http(s):///ws(s):// scheme) is taken to mean – the mariner being explicit with a scheme always wins over this. A caller with the boat’s own certificate authority installed should pass true: a mariner who has been through installing one is running a secured server, and silently dialling plain text would be the one guess with a cost.