From 984b8caf5aa2e6df761f1b4a4ec63bf9a163b303 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Tue, 17 Jul 2018 14:30:14 +0200 Subject: [PATCH] ws/context: Add docs to `write()` method --- src/ws/context.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ws/context.rs b/src/ws/context.rs index 44370533a..c051c652f 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -132,6 +132,11 @@ where A: Actor, { /// Write payload + /// + /// This is a low-level function that accepts framed messages that should + /// be created using `Frame::message()`. If you want to send text or binary + /// data you should prefer the `text()` or `binary()` convenience functions + /// that handle the framing for you. #[inline] pub fn write(&mut self, data: Binary) { if !self.disconnected {