add protocol header v2 to server and client

This commit is contained in:
Toshit Chawda 2024-10-24 00:16:11 -07:00
parent cda7ed2190
commit 1ae3986a82
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
8 changed files with 84 additions and 63 deletions

View file

@ -31,7 +31,7 @@ pub type ProviderUnencryptedAsyncRW = MuxStreamAsyncRW;
pub type ProviderTlsAsyncRW = IgnoreCloseNotify;
pub type ProviderAsyncRW = Either<ProviderTlsAsyncRW, ProviderUnencryptedAsyncRW>;
pub type ProviderWispTransportGenerator = Box<
dyn Fn() -> Pin<
dyn Fn(bool) -> Pin<
Box<
dyn Future<
Output = Result<
@ -124,7 +124,7 @@ impl StreamProvider {
None
};
let (read, write) = (self.wisp_generator)().await?;
let (read, write) = (self.wisp_generator)(self.wisp_v2).await?;
let client = ClientMux::create(read, write, extensions).await?;
let (mux, fut) = if self.udp_extension {