A lightweight network service discovery protocol
git clone https://github.com/slpuk/scoperta.gitnpm startScoperta is an open-source service for network device discovery. It serves as a lightweight alternative to services like Apple's Bonjour or the Linux community's Avahi.
The service operates over the UDP transport protocol using multicast transmission. It runs on the address 224.0.112.80 via port 57620.
The service utilizes binary packets with minimal per-packet overhead.
Packet cheme:
[ Magic ] - 1 Byte
[ ID ] - 2 Bytes
[ Name Length ] - 1 Byte
[ Name ] - up to 255 Bytes
[ Payload Length ] - 1 Byte
[ Payload ] - up to 255 Bytes
[ CRC-32 ] - 4 Bytes
Field Descriptions:
Magic- A unique version identifier used to implicitly filter out network noise and legacy packets. CRC-8-ROHC hash of"Scoperta/{version}", where version is the protocol version string (e.g., "1", "2").This provides both versioning and noise filtering.ID- A unique client identifier generated randomly.Name Length- The length of the client’s name (Name).Name- A user-defined client name, UTF-8 encoded, up to 255 bytes.Payload Length- The length of thePayload.Payload- A user-defined data, up to 255 Bytes.CRC-32- The packet's checksum for error detection.
Example Payload (JSON):
{"type":"temperature", "port":5678, "protocol":"udp"}Note: Multi-byte integers (ID, CRC-32) are transmitted in network byte order (big-endian).
This project is licensed under the Apache 2.0 License.