pub(crate) enum SessionCommand {
Close {
drain: Duration,
},
}Expand description
A request delivered to one session’s command task.
Crate-internal and not a mirror of the public surface: the two stream-level verbs resolve in the caller and never appear here, and the one that does reach a session arrives already validated, so the session task never has to decide whether a request was well-formed.
Variants§
Close
Give this session’s egress queues drain to flush, then end it.
Carries no close code, because the code and reason were recorded into the session’s closer before this was sent and are read back from there at teardown. Carrying them here as well would be a second source for one fact, and the two could disagree if the session were torn down by its peer between the two steps — which is precisely the case the recording is done first to get right.