pub struct Server {
pub host: String,
pub address: IpAddr,
pub port: u16,
pub self_id: Option<String>,
pub vessel_name: Option<String>,
pub secure: bool,
}Expand description
A server that answered.
Fields§
§host: StringWhat it calls itself on the network.
address: IpAddrAddress to connect to. Preferred over the host name: a boat network with no working name resolution is the normal case, not the odd one.
Kept as an address rather than a string because the two families do not go into a URL the same way, and a string invites forgetting that.
port: u16The stream’s port.
self_id: Option<String>The vessel’s own identifier, straight out of the TXT record. Deltas about own ship arrive under this, in full, rather than under “vessels.self” – confirmed against a real server.
vessel_name: Option<String>The vessel’s name, if the server states one. For telling two boats apart in a marina, where several servers answer.
secure: boolWhether this server speaks TLS, taken from which service it announced itself under rather than guessed or attempted.