Converted a large part of utils/ folder to google code docstrings as per #709.
This commit is contained in:
parent
fc4beed9ca
commit
eb2bd8d44c
17 changed files with 1107 additions and 406 deletions
|
|
@ -228,7 +228,7 @@ def make_hybi07_frame_dwim(buf):
|
|||
"""
|
||||
Make a HyBi-07 frame with binary or text data according to the type of buf.
|
||||
"""
|
||||
|
||||
|
||||
# TODO: eliminate magic numbers.
|
||||
if isinstance(buf, str):
|
||||
return make_hybi07_frame(buf, opcode=0x2)
|
||||
|
|
@ -349,7 +349,7 @@ class WebSocketProtocol(ProtocolWrapper):
|
|||
def setBinaryMode(self, mode):
|
||||
"""
|
||||
If True, send str as binary and unicode as text.
|
||||
|
||||
|
||||
Defaults to false for backwards compatibility.
|
||||
"""
|
||||
self.do_binary_frames = bool(mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue