Skip to main content

Module socket_transport

Module socket_transport 

Source
Expand description

SocketTransport — the client side of the daemon UDS (PLAN-phase2 §2.10).

Line-JSON frames (wire.rs). A writer task owns the write half; the reader lives on the transport. Backpressure mirrors LocalTransport: send fails with Backpressure when the bounded writer queue is full and Closed once the socket is gone — never a silent drop.

Tracing here logs frame types only (ClientFrame’s redacting Debug).

Re-exports§

pub use crate::extensions::manager::ExtensionReloadReport;

Structs§

Connected
A connection past Hello/Welcome, before Attach.
ExtensionReloadFailure
The daemon’s reason an extension was not reloaded (DaemonFrame::ExtensionReloadFailed).
FrameBuf
Reused line buffer for read_frame: a big Attached/MessageHistory frame grows it once; after any frame > 1 MiB it shrinks back to 64 KiB so the peak is not retained for the life of the connection (§2.1 #1).
Pong
SocketTransport

Enums§

AuthStateReply
What synaps auth state got from the daemon.

Constants§

CLOSE_TIMEOUT
How long close waits for the daemon’s answer: its queue retry, the actor’s reply and the session’s end (daemon/close.rs budgets), plus a margin.
CONNECT_TIMEOUT
HANDSHAKE_TIMEOUT
PIN_TIMEOUT
How long pin waits for the daemon’s answer: its longest wait (a parked session unparking) plus a margin.
RELOAD_EXTENSION_TIMEOUT
How long reload_extension waits: the daemon first waits for the extension manager’s lock, then stops the old process and runs the new one’s start-up handshake (each bounded by the extension runtime’s own timeouts, around 15 s together). Generous, because giving up early only hides the answer: the daemon finishes the reload either way.

Functions§

predates_auth_state
An old daemon’s reply to AuthState (daemon/conn.rs Read::Bad: serde’s unknown-variant error behind “malformed frame: “), and nothing else.