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
This commit is contained in:
@@ -2,7 +2,18 @@
|
||||
# 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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user