1
This commit is contained in:
parent
bca35ee42c
commit
0e4b8daa34
@ -29,7 +29,7 @@ pub trait UserApp {
|
|||||||
fn get_http_listen_port(&self) -> i32;
|
fn get_http_listen_port(&self) -> i32;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct HttpContext {
|
pub struct HttpContext {
|
||||||
id: u64,
|
id: u64,
|
||||||
query_str: String,
|
query_str: String,
|
||||||
add_tick: i64,
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user