ksp disconnect
ksp disconnect
Command ReferenceGracefully 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 specificationbash / powershell
ksp disconnect [SESSION_ID] [OPTIONS]
Arguments
| Argument | Description |
|---|---|
| [SESSION_ID] | Optional target session ID if multiple concurrent sessions are active in the background. |
Options & Flags
| Option Flag | Description |
|---|---|
| --reason <CODE> | Shutdown reason: `NORMAL`, `PROTOCOL_ERROR`, `INTERNAL_ERROR`, or `MAINTENANCE`. |
| --force | Immediately 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.