diff --git a/guide/src/qs_9.md b/guide/src/qs_9.md index dbca38384..70d1e018f 100644 --- a/guide/src/qs_9.md +++ b/guide/src/qs_9.md @@ -43,7 +43,7 @@ fn main() { ``` Simple websocket echo server example is available in -[examples directory](https://github.com/actix/actix-web/blob/master/examples/websocket.rs). +[examples directory](https://github.com/actix/actix-web/blob/master/examples/websocket). Example chat server with ability to chat over websocket connection or tcp connection is available in [websocket-chat directory](https://github.com/actix/actix-web/tree/master/examples/websocket-chat/) diff --git a/src/ws/frame.rs b/src/ws/frame.rs index 612fe2f0a..8771435fa 100644 --- a/src/ws/frame.rs +++ b/src/ws/frame.rs @@ -191,7 +191,7 @@ impl Frame { unsafe{buf.advance_mut(2)}; buf } else { - let mut buf = BytesMut::with_capacity(p_len + 8); + let mut buf = BytesMut::with_capacity(p_len + 10); buf.put_slice(&[one, two | 127]); { let buf_mut = unsafe{buf.bytes_mut()};