From 823ae55024ed257d56cc3d85001a1921f885ab00 Mon Sep 17 00:00:00 2001 From: EAimTY Date: Fri, 27 Jan 2023 00:42:23 +0900 Subject: [PATCH] `collect_garbage()` for `tuic_quinn::Connection` --- tuic-quinn/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tuic-quinn/src/lib.rs b/tuic-quinn/src/lib.rs index 64f3ca2..cd6973e 100644 --- a/tuic-quinn/src/lib.rs +++ b/tuic-quinn/src/lib.rs @@ -8,6 +8,7 @@ use std::{ io::Error as IoError, pin::Pin, task::{Context, Poll}, + time::Duration, }; use thiserror::Error; use tuic::{ @@ -98,6 +99,10 @@ impl<'conn, Side> Connection<'conn, Side> { } } + pub fn collect_garbage(&self, timeout: Duration) { + self.model.collect_garbage(timeout); + } + async fn accept_packet_quic( &self, model: PacketModel,