Module client

Module client 

Source
Expand description

High-performance raw TCP client implementation with TLS capability, automatic reconnection with exponential backoff and state management.

Key features:

  • Connection state tracking (ACTIVE/RECONNECTING/DISCONNECTING/CLOSED).
  • Synchronized reconnection with backoff.
  • Split read/write architecture.
  • Python callback integration.

Design:

  • Single reader, multiple writer model.
  • Read half runs in dedicated task.
  • Write half runs in dedicated task connected with channel.
  • Controller task manages lifecycle.

Structsยง

SocketClient