diff options
author | Alex Auvolat <alex@adnab.me> | 2022-09-01 12:15:50 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-09-01 12:15:50 +0200 |
commit | cd203f5708907c2bf172a3c5b7c5b40e2557b2f4 (patch) | |
tree | 8b3eb284106d0f6b5af1ad4ad447c8004ff4c6f5 /src/send.rs | |
parent | 745c78618479c4177647e4d7fed97d5fd2d00d4f (diff) | |
download | netapp-cd203f5708907c2bf172a3c5b7c5b40e2557b2f4.tar.gz netapp-cd203f5708907c2bf172a3c5b7c5b40e2557b2f4.zip |
Add OrderTag to Req and Resp, refactor errors
Diffstat (limited to 'src/send.rs')
-rw-r--r-- | src/send.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/send.rs b/src/send.rs index 287fe40..c40787f 100644 --- a/src/send.rs +++ b/src/send.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use std::task::{Context, Poll}; use async_trait::async_trait; -use bytes::{Bytes, BytesMut, BufMut}; +use bytes::{BufMut, Bytes, BytesMut}; use log::*; use futures::AsyncWriteExt; @@ -36,6 +36,8 @@ pub(crate) const ERROR_MARKER: ChunkLength = 0x4000; pub(crate) const CHUNK_HAS_CONTINUATION: ChunkLength = 0x8000; pub(crate) const CHUNK_LENGTH_MASK: ChunkLength = 0x3FFF; +pub(crate) type SendStream = (RequestID, RequestPriority, ByteStream); + struct SendQueue { items: Vec<(u8, VecDeque<SendQueueItem>)>, } @@ -184,7 +186,7 @@ impl DataFrame { pub(crate) trait SendLoop: Sync { async fn send_loop<W>( self: Arc<Self>, - msg_recv: mpsc::UnboundedReceiver<(RequestID, RequestPriority, ByteStream)>, + msg_recv: mpsc::UnboundedReceiver<SendStream>, mut write: BoxStreamWrite<W>, ) -> Result<(), Error> where |