Skip to Content
Welcome to the Spectrum Documentation

ConstaNetDiscovery

ConstaNetDiscovery.gd  Extends: ConstaNetHeadder

Copyright (c) 2025
Liam Sherwin — All rights reserved.
Licensed under GPLv3

ConstaNetDiscovery is the packet type used by Constellation Network nodes to announce their presence, capabilities, and connection endpoints.
It is typically broadcast on the local network so other nodes can discover available devices and their roles.

Member Variables

node_name

DataType: String
Default: "UnNamedNode"
Human-readable name of the origin node. Used to identify devices on the network.


node_ip

DataType: String
Default: ""
IPv4 address of the origin node, encoded from or into a PackedByteArray via the shared utility functions
See: ip_to_bytes and bytes_to_ip.


role_flags

DataType: int
Default: RoleFlags.EXECUTOR
Bitmask representing the node’s capabilities.
See: RoleFlags.


tcp_port

DataType: int
Default: 0
The TCP port this node listens on for session-level control and high-reliability communication.


udp_port

DataType: int
Default: 0
The UDP port this node listens on for lightweight or real-time packets (e.g., discovery, heartbeats).


Packet Structure

Offsets below refer to the payload portion (after the base header defined in ConstaNetHeadder).
See DataTypes.

OffsetTypeField
0uint8Name length
1stringNode name
Nuint8[4]IPv4 address
N+4uint16Role flags
N+6uint16TCP port
N+8uint16UDP port
Last updated on