This commit is contained in:
azw 2024-05-08 21:10:24 +08:00
parent af0cae3d24
commit 60b819fc06
2 changed files with 16 additions and 0 deletions

View File

@ -11,7 +11,10 @@ serde_derive = "*"
serde_json = "*"
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.11.22", features = ["blocking", "json"] }
actix = "0.13.1"
actix-web = "4"
actix-web-actors = "4.2.0"
actix-rt = "1.0.0"
r9 = { path = "../r9" }
r9_macro = { path = "../r9_macro" }
r9_macro_derive = { path = "../r9_macro_derive" }

View File

@ -18,6 +18,8 @@ use std::collections::HashMap;
use std::any::Any;
use serde_derive::Deserialize;
use reqwest::blocking;
use actix_web_actors::ws;
use actix::prelude::*;
use r9_macro::SharedFromSelf;
use r9_macro_derive::SharedFromSelf;
@ -39,6 +41,17 @@ pub struct HttpContext {
pub rsp: String
}
#[derive(Message)]
#[rtype(result = "()")]
pub struct Message(pub String);
/// Session is disconnected
#[derive(Message)]
#[rtype(result = "()")]
pub struct Disconnect {
pub id: usize,
}
#[derive(SharedFromSelf)]
pub struct App {
_self_wp: Weak::<RefCell::<Self>>,