LanAdvertiser
Advertises a service on the local network so nearby peers can discover it.
serviceType namespaces the advertisement. On Android NSD and iOS/Bonjour it is the DNS-SD service type (e.g. "_kursi._tcp"); the JVM UDP beacon uses it as a magic wire token so foreign traffic and other services on the shared beacon port are ignored. Two apps that pick distinct service types can coexist on one subnet. Changing it is a breaking change to discovery compatibility.
Platform actuals:
android — android.net.nsd.NsdManager (DNS-SD). Needs an app android.content.Context installed once via
installLanContext(...); without it, advertise/discover degrade to no-ops.ios —
NSNetService/ Bonjour.jvm — a real UDP-broadcast beacon (java.net.DatagramSocket) on LAN_UDP_PORT.
wasm — safe no-op (browsers cannot open raw sockets); start/stop succeed and do nothing.
Lifecycle: construct with a serviceType, call start with the coordinates, and stop when done. Implementations are NOT required to be restartable after stop; create a new instance per ad.
Advertises a service on the local network so nearby peers can discover it.
serviceType namespaces the advertisement. On Android NSD and iOS/Bonjour it is the DNS-SD service type (e.g. "_kursi._tcp"); the JVM UDP beacon uses it as a magic wire token so foreign traffic and other services on the shared beacon port are ignored. Two apps that pick distinct service types can coexist on one subnet. Changing it is a breaking change to discovery compatibility.
Platform actuals:
android — android.net.nsd.NsdManager (DNS-SD). Needs an app android.content.Context installed once via
installLanContext(...); without it, advertise/discover degrade to no-ops.ios —
NSNetService/ Bonjour.jvm — a real UDP-broadcast beacon (java.net.DatagramSocket) on LAN_UDP_PORT.
wasm — safe no-op (browsers cannot open raw sockets); start/stop succeed and do nothing.
Lifecycle: construct with a serviceType, call start with the coordinates, and stop when done. Implementations are NOT required to be restartable after stop; create a new instance per ad.
Advertises a service on the local network so nearby peers can discover it.
serviceType namespaces the advertisement. On Android NSD and iOS/Bonjour it is the DNS-SD service type (e.g. "_kursi._tcp"); the JVM UDP beacon uses it as a magic wire token so foreign traffic and other services on the shared beacon port are ignored. Two apps that pick distinct service types can coexist on one subnet. Changing it is a breaking change to discovery compatibility.
Platform actuals:
android — android.net.nsd.NsdManager (DNS-SD). Needs an app android.content.Context installed once via
installLanContext(...); without it, advertise/discover degrade to no-ops.ios —
NSNetService/ Bonjour.jvm — a real UDP-broadcast beacon (java.net.DatagramSocket) on LAN_UDP_PORT.
wasm — safe no-op (browsers cannot open raw sockets); start/stop succeed and do nothing.
Lifecycle: construct with a serviceType, call start with the coordinates, and stop when done. Implementations are NOT required to be restartable after stop; create a new instance per ad.
Advertises a service on the local network so nearby peers can discover it.
serviceType namespaces the advertisement. On Android NSD and iOS/Bonjour it is the DNS-SD service type (e.g. "_kursi._tcp"); the JVM UDP beacon uses it as a magic wire token so foreign traffic and other services on the shared beacon port are ignored. Two apps that pick distinct service types can coexist on one subnet. Changing it is a breaking change to discovery compatibility.
Platform actuals:
android — android.net.nsd.NsdManager (DNS-SD). Needs an app android.content.Context installed once via
installLanContext(...); without it, advertise/discover degrade to no-ops.ios —
NSNetService/ Bonjour.jvm — a real UDP-broadcast beacon (java.net.DatagramSocket) on LAN_UDP_PORT.
wasm — safe no-op (browsers cannot open raw sockets); start/stop succeed and do nothing.
Lifecycle: construct with a serviceType, call start with the coordinates, and stop when done. Implementations are NOT required to be restartable after stop; create a new instance per ad.
Advertises a service on the local network so nearby peers can discover it.
serviceType namespaces the advertisement. On Android NSD and iOS/Bonjour it is the DNS-SD service type (e.g. "_kursi._tcp"); the JVM UDP beacon uses it as a magic wire token so foreign traffic and other services on the shared beacon port are ignored. Two apps that pick distinct service types can coexist on one subnet. Changing it is a breaking change to discovery compatibility.
Platform actuals:
android — android.net.nsd.NsdManager (DNS-SD). Needs an app android.content.Context installed once via
installLanContext(...); without it, advertise/discover degrade to no-ops.ios —
NSNetService/ Bonjour.jvm — a real UDP-broadcast beacon (java.net.DatagramSocket) on LAN_UDP_PORT.
wasm — safe no-op (browsers cannot open raw sockets); start/stop succeed and do nothing.
Lifecycle: construct with a serviceType, call start with the coordinates, and stop when done. Implementations are NOT required to be restartable after stop; create a new instance per ad.
Constructors
Functions
Begins advertising host:port / payload under serviceName. Safe to call once; calling again before stop is implementation-defined (prefer one instance per advertisement).
Begins advertising host:port / payload under serviceName. Safe to call once; calling again before stop is implementation-defined (prefer one instance per advertisement).
Begins advertising host:port / payload under serviceName. Safe to call once; calling again before stop is implementation-defined (prefer one instance per advertisement).
Begins advertising host:port / payload under serviceName. Safe to call once; calling again before stop is implementation-defined (prefer one instance per advertisement).
Stops advertising and releases platform resources. Idempotent.
Stops advertising and releases platform resources. Idempotent.
Stops advertising and releases platform resources. Idempotent.
Stops advertising and releases platform resources. Idempotent.
Stops advertising and releases platform resources. Idempotent.