-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
362 additions
and
264 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
[server] | ||
|
||
log_level = "debug" | ||
log_level = "error" | ||
|
||
|
||
[channel] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
use crate::agents::websocket::SocketClient; | ||
use actix::prelude::*; | ||
use actix_web::web::Bytes; | ||
use rustgym_msg::ClientInfo; | ||
use rustgym_msg::Msg; | ||
|
||
#[derive(Message, Clone, new)] | ||
#[rtype(result = "()")] | ||
pub struct Chunk { | ||
pub client_addr: Addr<SocketClient>, | ||
pub client_info: ClientInfo, | ||
pub bytes: Bytes, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,46 @@ | ||
use crate::agents::websocket::SocketClient; | ||
use actix::prelude::*; | ||
use rustgym_msg::ClientInfo; | ||
use rustgym_msg::Msg; | ||
use serde::{Deserialize, Serialize}; | ||
use rustgym_msg::*; | ||
use std::fmt; | ||
|
||
#[derive(Debug, Deserialize, Serialize, Clone, new)] | ||
#[derive(Message, Debug, Clone, new)] | ||
#[rtype(result = "()")] | ||
pub struct Envelope { | ||
pub client_addr: Addr<SocketClient>, | ||
pub client_info: ClientInfo, | ||
pub msg: Msg, | ||
} | ||
|
||
impl Envelope { | ||
pub fn from_msg_in( | ||
client_addr: Addr<SocketClient>, | ||
client_info: ClientInfo, | ||
msg_in: MsgIn, | ||
) -> Self { | ||
let msg = Msg::In(msg_in); | ||
Envelope { | ||
client_addr, | ||
client_info, | ||
msg, | ||
} | ||
} | ||
pub fn from_msg_out( | ||
client_addr: Addr<SocketClient>, | ||
client_info: ClientInfo, | ||
msg_out: MsgOut, | ||
) -> Self { | ||
let msg = Msg::Out(msg_out); | ||
Envelope { | ||
client_addr, | ||
client_info, | ||
msg, | ||
} | ||
} | ||
} | ||
|
||
impl fmt::Debug for SocketClient { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
write!(f, "<SocketClient>") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
pub mod chunk; | ||
pub mod envelope; | ||
pub mod package; | ||
pub mod registry; | ||
pub mod search; | ||
pub mod uap; | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.