ksp disconnect
DocsCLIksp disconnect

ksp disconnect

Command Reference

Gracefully terminate an active KSP session by sending a signed `GoAway` frame and flushing pending buffers.

Networking & Diagnostics

Purpose

Gracefully terminate an active KSP session by sending a signed `GoAway` frame and flushing pending buffers.

Syntax

Command-line specification
bash / powershell
ksp disconnect [SESSION_ID] [OPTIONS]

Arguments

ArgumentDescription
[SESSION_ID]Optional target session ID if multiple concurrent sessions are active in the background.

Options & Flags

Option FlagDescription
--reason <CODE>Shutdown reason: `NORMAL`, `PROTOCOL_ERROR`, `INTERNAL_ERROR`, or `MAINTENANCE`.
--forceImmediately sever the underlying TCP/UDP socket without waiting for stream drains.

Example Usage

Example command
ksp disconnect --reason NORMAL

Expected Output

  [+] Sending GoAway frame (Reason: NORMAL_SHUTDOWN | LastStreamID: 7)
  [+] Waiting 150ms for remote acknowledgment...
  [✔] Session cleanly closed. Cryptographic key material zeroized from memory.
Implementation Notes

Ensures no in-flight stream frames are corrupted during termination and explicitly clears sensitive ephemeral session keys from RAM.