Documentation
¶
Overview ¶
SPDX-License-Identifier: MPL-2.0 Copyright (c) 2025 KeibiSoft S.R.L. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. Package discovery implements LAN peer discovery using UDP multicast. No third-party dependencies — uses only net and encoding/json from stdlib.
Peers broadcast a small JSON beacon on a multicast group every few seconds. Each beacon contains a random two-word name (rotated per session) and the listening port. No fingerprints or identity info is broadcast.
SPDX-License-Identifier: MPL-2.0 Copyright (c) 2025 KeibiSoft S.R.L. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beacon ¶
type Beacon struct {
Name string `json:"n"` // random two-word name (e.g., "Cosmic Waffle")
Port int `json:"p"` // TCP listening port for KeibiDrop
Ver int `json:"v,omitempty"` // protocol version (1)
}
Beacon is the UDP payload broadcast by each peer.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles both advertising and browsing for KeibiDrop peers.