ws/context: Add docs to `write()` method

This commit is contained in:
Tobias Bieniek 2018-07-17 14:30:14 +02:00
parent f612b17929
commit 984b8caf5a
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ where
A: Actor<Context = Self>, A: Actor<Context = Self>,
{ {
/// Write payload /// 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] #[inline]
pub fn write(&mut self, data: Binary) { pub fn write(&mut self, data: Binary) {
if !self.disconnected { if !self.disconnected {