zero copy tunnel (#55)

make tunnel zero copy, for better performance. remove most of the locks in io path.
introduce quic tunnel
prepare for encryption
This commit is contained in:
Sijie.Sun
2024-04-24 23:12:46 +08:00
committed by GitHub
parent 39021d7b1b
commit 3467890270
44 changed files with 6504 additions and 688 deletions
+10 -1
View File
@@ -2,7 +2,7 @@ use std::{io, result};
use thiserror::Error;
use crate::tunnels;
use crate::{tunnel, tunnels};
use super::PeerId;
@@ -38,6 +38,15 @@ pub enum Error {
Unknown,
#[error("anyhow error: {0}")]
AnyhowError(#[from] anyhow::Error),
#[error("wait resp error: {0}")]
WaitRespError(String),
#[error("tunnel error")]
TunnelErr(#[from] tunnel::TunnelError),
#[error("message decode error: {0}")]
MessageDecodeError(String),
}
pub type Result<T> = result::Result<T, Error>;