This commit is contained in:
azw 2023-11-11 08:34:49 +00:00
parent bca35ee42c
commit 0e4b8daa34

View File

@ -29,7 +29,7 @@ pub trait UserApp {
fn get_http_listen_port(&self) -> i32;
}
struct HttpContext {
pub struct HttpContext {
id: u64,
query_str: String,
add_tick: i64,
@ -279,4 +279,8 @@ impl App {
});
}
pub fn add_http_handler(&mut self, key: String, cb: Box::<dyn FnMut (&HttpContext)>) {
self.http_handlers.insert(key, cb);
}
}