pub struct ProxySession { /* private fields */ }Expand description
A proxy session that forwards traffic between a client and an upstream relay. One session is created per accepted client connection.
Implementations§
Source§impl ProxySession
impl ProxySession
Sourcepub fn new(
session_id: SessionId,
config: ProxySessionConfig,
client_alpn: Vec<u8>,
observer: Arc<dyn ProxyObserver>,
hook: Arc<dyn ProxyHook>,
cancel: CancellationToken,
) -> Self
pub fn new( session_id: SessionId, config: ProxySessionConfig, client_alpn: Vec<u8>, observer: Arc<dyn ProxyObserver>, hook: Arc<dyn ProxyHook>, cancel: CancellationToken, ) -> Self
Create a new proxy session.
client_alpn should be the ALPN the listener negotiated with the
client. Pass an empty slice if unavailable (e.g., WebTransport).
Sourcepub async fn run(self, client_conn: Connection) -> Result<(), ProxyError>
pub async fn run(self, client_conn: Connection) -> Result<(), ProxyError>
Run the proxy session with a raw QUIC client connection.
Auto Trait Implementations§
impl Freeze for ProxySession
impl !RefUnwindSafe for ProxySession
impl Send for ProxySession
impl Sync for ProxySession
impl Unpin for ProxySession
impl UnsafeUnpin for ProxySession
impl !UnwindSafe for ProxySession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more