We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5465676 commit ed17dd6Copy full SHA for ed17dd6
docs/source/index.rst
@@ -8,7 +8,7 @@ Working with it is easy:
8
9
.. code-block:: python
10
11
- import hyperframe
+ import hyperframe.frame
12
13
f = hyperframe.frame.DataFrame(stream_id=5)
14
f.data = b'some binary data'
@@ -18,8 +18,8 @@ Working with it is easy:
18
19
data = f.serialize()
20
21
- new_frame = hyperframe.frame.Frame.parse_frame_header(data[:9])
22
- new_frame.parse_body(data[9:])
+ new_frame, length = hyperframe.frame.Frame.parse_frame_header(data[:9])
+ new_frame.parse_body(memoryview(data[9:9 + length]))
23
24
hyperframe is pure-Python, contains no external dependencies, and runs on a
25
wide variety of Python interpreters and platforms. Made available under the MIT
0 commit comments