detach method
Detaches this session: asks the node to keep the PTY, shell and child processes running while the client disconnects. Completes with the detached session's id and short handle once the node confirms.
Unlike close, this never terminates the remote shell. After it completes the caller should drop the connection (without calling close).
Implementation
Future<DetachOutcome> detach({Duration? timeout}) {
_channel.sendControl(
SessionDetachRequest(
channel: _channel.id,
timeoutSeconds: timeout?.inSeconds,
),
);
return _detached.future;
}