LanHost

data class LanHost(val host: String, val port: Int, val payload: String, val name: String)

A service advertised on the local network, as seen by a discovering peer.

Carries what a peer needs to reach the advertiser: where it is (host:port), an opaque payload the advertiser attached (e.g. a room/session code, a token, arbitrary metadata), and a human-friendly name for a "nearby" list. Only public reachability data should ever be advertised.

Constructors

Link copied to clipboard
constructor(host: String, port: Int, payload: String, name: String)

Properties

Link copied to clipboard

Resolvable host address (IPv4/IPv6 literal or mDNS hostname) of the advertising service.

Link copied to clipboard

Human-friendly service name for display (e.g. "Sid's table").

Link copied to clipboard

Opaque application payload attached to the advertisement (room code, token, metadata, …).

Link copied to clipboard
val port: Int

TCP port the advertised service listens on.