pub fn load_host_keys(path: &str) -> Result<PrivateKey, Error>Examples found in repository?
examples/counter.rs (line 57)
55async fn main() {
56 let host_key =
57 load_host_keys("./examples/host_keys/id_ed25519").expect("Failed to load host keys");
58 let mut methods = MethodSet::empty();
59 methods.push(MethodKind::None);
60
61 let config = Config {
62 inactivity_timeout: Some(std::time::Duration::from_secs(3600)),
63 auth_rejection_time: std::time::Duration::from_secs(3),
64 auth_rejection_time_initial: Some(std::time::Duration::from_secs(0)),
65 keys: vec![host_key],
66 methods,
67 ..Default::default()
68 };
69
70 let mut server = ChaiServer::<MyApp>::new(2222).with_tick_rate(std::time::Duration::from_millis(250));
71 server.run(config).await.expect("Failed running server");
72}