Module socket

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
SocketConfig
Configuration for TCP socket connection.

Enums§

WriterCommand
Represents a command for the writer task.

Type Aliases§

TcpMessageHandler