From 3a3657cfaf0c5b8723b7dfc9640c2c4c63fddab4 Mon Sep 17 00:00:00 2001 From: pyros2097 Date: Fri, 23 Feb 2018 12:39:19 +0530 Subject: [PATCH 1/2] Update qs_9.md --- guide/src/qs_9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/) From 25aabfb3e2ac291fc369b893ec5c6105dceb91fd Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 23 Feb 2018 10:45:33 +0100 Subject: [PATCH 2/2] fix big ws frames --- src/ws/frame.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()};