macula_connection (macula v0.7.29)
View SourceMacula Connection - QUIC Transport Layer (v0.7.0+).
This module manages the low-level QUIC connection lifecycle and message transport for mesh participants.
Responsibilities: - Establish and maintain QUIC connection - Send messages via QUIC stream - Receive and route incoming messages to handlers - Handle connection errors and reconnection - Message encoding/decoding and buffering
Renamed from macula_connection in v0.7.0 for clarity: - macula_connection = QUIC transport (this module - low-level) - macula_peer = mesh participant (high-level API)
Summary
Functions
Decode all complete messages from buffer.
-spec default_config() -> map().
-spec get_status(pid()) -> connecting | connected | disconnected | error.
-spec start_keepalive_timer(#state{url :: binary(), opts :: map(), node_id :: binary(), realm :: binary(), connection :: pid() | undefined, stream :: pid() | undefined, status :: connecting | connected | disconnected | error, recv_buffer :: binary(), keepalive_timer :: reference() | undefined}) -> #state{url :: binary(), opts :: map(), node_id :: binary(), realm :: binary(), connection :: pid() | undefined, stream :: pid() | undefined, status :: connecting | connected | disconnected | error, recv_buffer :: binary(), keepalive_timer :: reference() | undefined}.
Start keep-alive timer if enabled in options.