1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

Add websockets continuation frame support

This commit is contained in:
Nikolay Kim
2019-12-12 14:06:54 +06:00
parent 4a1695f719
commit b4b3350b3e
7 changed files with 269 additions and 68 deletions

View File

@ -880,14 +880,17 @@ mod tests {
bytes: bytes,
pos: 0,
ready: false,
}
};
}
}
impl Stream for SlowStream {
type Item = Result<Bytes, PayloadError>;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context,
) -> Poll<Option<Self::Item>> {
let this = self.get_mut();
if !this.ready {
this.ready = true;