ITADN

Is it possible to add a `try_write`/`write_bytes` api?

#129ClosedFallingSnow 创建于 2025-11-26
F
FallingSnowcommented
I'm trying to send compressed video frames from a weak device, so I try to do as little buffer copying as possible. The issue is, when a client looses connection, the server will stall at `.write().await`. This in turn holds one of the video buffers hostage until the client connection times out. So is it possible to expose a `try_write` method? I did a little looking and it doesn't seem quinn exposes something to do that but I thought I'd ask. Additionally exposing quinn's `write_chunk` might be useful to avoid copying memory within quinn.
关闭于 2025-11-28 2 条评论