diff options
| author | Fuwn <[email protected]> | 2021-06-06 00:24:21 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-06-06 00:24:21 +0000 |
| commit | 7cebc1e93093c68c65ce1dfb540d2dd30a9159a0 (patch) | |
| tree | c1568d3cd8ea95aba32b1ac41debad57b1a37f30 /crates/whirl_server/src/interaction | |
| parent | fix(whirl_server::hub): space between debug log message (diff) | |
| download | whirl-7cebc1e93093c68c65ce1dfb540d2dd30a9159a0.tar.xz whirl-7cebc1e93093c68c65ce1dfb540d2dd30a9159a0.zip | |
refactor(whirl_server): move orphan types out of orphan module
Diffstat (limited to 'crates/whirl_server/src/interaction')
| -rw-r--r-- | crates/whirl_server/src/interaction/peer.rs | 4 | ||||
| -rw-r--r-- | crates/whirl_server/src/interaction/shared.rs | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/crates/whirl_server/src/interaction/peer.rs b/crates/whirl_server/src/interaction/peer.rs index 6a04b17..d7ac49e 100644 --- a/crates/whirl_server/src/interaction/peer.rs +++ b/crates/whirl_server/src/interaction/peer.rs @@ -9,11 +9,11 @@ use tokio::{ }; use tokio_util::codec::{BytesCodec, Framed}; -use crate::{interaction::shared::Shared, types::Rx}; +use crate::interaction::shared::Shared; pub struct Peer { pub bytes: Framed<TcpStream, BytesCodec>, - pub rx: Rx, + pub rx: mpsc::UnboundedReceiver<bytes::BytesMut>, } impl Peer { pub async fn new( diff --git a/crates/whirl_server/src/interaction/shared.rs b/crates/whirl_server/src/interaction/shared.rs index 7ad2510..91d7395 100644 --- a/crates/whirl_server/src/interaction/shared.rs +++ b/crates/whirl_server/src/interaction/shared.rs @@ -5,10 +5,8 @@ use std::collections::HashMap; use bytes::BytesMut; -use crate::types::Tx; - pub struct Shared { - pub peers: HashMap<String, Tx>, + pub peers: HashMap<String, tokio::sync::mpsc::UnboundedSender<BytesMut>>, } impl Shared { pub fn new() -> Self { |