Skip to content

Commit

Permalink
Clarify send/receive keys
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgodwin committed Jun 24, 2018
1 parent c3b2a5d commit d25b326
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions specs/www.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,13 @@ Keys:
* ``type``: ``websocket.receive``

* ``bytes``: Byte string of the message content, if it was binary mode, or
``None``.
``None``. Optional; if missing, it is equivalent to ``None``.

* ``text``: Unicode string of the message content, if it was text mode, or
``None``.
``None``. Optional; if missing, it is equivalent to ``None``.

Exactly one of ``bytes`` or ``text`` must be non-``None``.
Exactly one of ``bytes`` or ``text`` must be non-``None``. One or both
keys may be present, however.


Send
Expand All @@ -274,10 +275,13 @@ Keys:
* ``type``: ``websocket.send``

* ``bytes``: Byte string of binary message content, or ``None``.
Optional; if missing, it is equivalent to ``None``.

* ``text``: Unicode string of text message content, or ``None``.
Optional; if missing, it is equivalent to ``None``.

Exactly one of ``bytes`` or ``text`` must be non-``None``.
Exactly one of ``bytes`` or ``text`` must be non-``None``. One or both
keys may be present, however.


Disconnection
Expand Down

0 comments on commit d25b326

Please sign in to comment.