1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

stop websocket context

This commit is contained in:
Nikolay Kim
2018-01-23 15:35:39 -08:00
parent 35efd017bb
commit f4873fcdee
2 changed files with 11 additions and 1 deletions

View File

@@ -27,6 +27,15 @@ pub enum Frame {
Drain(oneshot::Sender<()>),
}
impl Frame {
pub fn len(&self) -> usize {
match *self {
Frame::Chunk(Some(ref bin)) => bin.len(),
_ => 0,
}
}
}
/// Http actor execution context
pub struct HttpContext<A, S=()> where A: Actor<Context=HttpContext<A, S>>,
{