node: Add Disconnect command

This is useful especially in tests to disconnect two nodes. We also
expose `command` on the handle type (but not the trait).
This commit is contained in:
Alexis Sellier
2023-05-03 16:16:34 +02:00
parent 0bfc3f59ee
commit 448ef67833
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ impl Handle {
self.controller.cmd(wire::Control::Flush { remote, stream })
}
fn command(&self, cmd: service::Command) -> Result<(), io::Error> {
pub(crate) fn command(&self, cmd: service::Command) -> Result<(), io::Error> {
self.controller.cmd(wire::Control::User(cmd))
}
}