Files
dynalab-core/src/dynalab_core/constants.py
T
h3cx f3b1a537f0 Implemented handshake and heartbeat
Implemented handshake in json server and handoff to endpoint

Endpoint handles connector handshake accept/decline then launches both
its IO threads alongside its heartbeat thread which contains simple
timeout logic, timeout calls connection handles to close, subsequently
killing the endpoint
2026-08-04 22:11:53 +01:00

20 lines
652 B
Python

# Copyright (C) 2026 Hector van der Aa <hector@h3cx.dev>
# Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
from uuid import uuid4
from dynalab_core.protocols.common import VersionDescriptor
from dynalab_core.protocols.constants import PROTOCOL_VERSION
from dynalab_core.protocols.packets.handshake import DynaLabHello
CORE_VERSION = VersionDescriptor(type="alpha", major=0, minor=0, patch=1)
HELLO_PACKET = DynaLabHello(
instance_id=uuid4(),
core_version=CORE_VERSION,
protocol_version=PROTOCOL_VERSION,
heartbeat_interval_ms=1000,
heartbeat_timeout_ms=5000,
)