read split frames

This commit is contained in:
Toshit Chawda 2024-07-22 11:04:12 -07:00
parent 7f37c8338e
commit 76eeec87dc
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 653 additions and 13 deletions

491
server/flamegraph.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 545 KiB

View file

@ -1,5 +1,5 @@
use anyhow::Context;
use fastwebsockets::{upgrade::UpgradeFut, FragmentCollectorRead};
use fastwebsockets::upgrade::UpgradeFut;
use futures_util::FutureExt;
use hyper_util::rt::TokioIo;
use tokio::{
@ -165,7 +165,6 @@ pub async fn handle_wisp(fut: UpgradeFut, id: String) -> anyhow::Result<()> {
assert_eq!(parts.read_buf.len(), 0);
parts.io.into_inner().split()
});
let read = FragmentCollectorRead::new(read);
let (extensions, buffer_size) = CONFIG.wisp.to_opts();