Expand description
Per-connection request context and async frame loop.
IoContext bundles the refcounted server metadata a handler needs —
server config plus connection bookkeeping — together with the SMB command
currently being served. Command routing lives in crate::cmds.
Structs§
- IoContext
- Bundled per-request context handed to every command handler.
- ReqView
- A parsed view over one request body inside the received frame.
Constants§
- OUTBOUND_
QUEUE_ 🔒DEPTH - Depth of the per-connection outbound frame queue.
Functions§
- process_
frame 🔒 - Execute one frame and build its response (
Noneto stay silent). - rand_
bytes - Cryptographically random bytes (urandom with time fallback).
- rand_
challenge 🔒 - Cryptographically random per-connection NTLM challenge.
- rand_
challenge_ pub - Cryptographically random per-connection NTLM challenge.
- serve_
client - Serve one client connection until EOF or transport error: read NBSS frames, route SMB1 and SMB2/3 (including encrypted/compressed transforms) to their processors, and release the session’s locks and durable handles on close.
- writer_
loop 🔒 - Drain the outbound frame queue into the connection’s write half. Runs as a
dedicated task so background work can emit unsolicited frames (async
STATUS_PENDING completions, oplock/lease breaks, CHANGE_NOTIFY) while the
reader blocks on
recv. Ends when every [mpsc::Sender] clone is dropped.
Type Aliases§
- IoCtx
- Short alias used by command handlers.