Skip to content

Commit 79438f7

Browse files
committed
Clarify the content of data in binary frames
1 parent f41e67c commit 79438f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ Both the server- and client-side `WebSocket` objects support the following API:
238238
Event has no attributes.
239239
- **`on(:message) { |event| }`** fires when the socket receives a message. Event
240240
has one attribute, **`data`**, which is either a `String` (for text frames) or
241-
an `Array` of byte-sized integers (for binary frames).
241+
an `Array` of unsigned integers, i.e. integers in the range `0..255` (for
242+
binary frames).
242243
- **`on(:error) { |event| }`** fires when there is a protocol error due to bad
243244
data sent by the other peer. This event is purely informational, you do not
244245
need to implement error recovery.

0 commit comments

Comments
 (0)