Skip to content

Commit db22457

Browse files
committed
cleanup
1 parent 370bf7e commit db22457

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

websocket.py

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313

1414

1515

16-
# ---------------------- Websocket bits in bytes -----------------------
16+
1717
'''
18-
+-+-+-+-+-------+-+-------------+-------------------------------+
19-
0 1 2 3
20-
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
21-
+-+-+-+-+-------+-+-------------+-------------------------------+
22-
|F|R|R|R| opcode|M| Payload len | Extended payload length |
23-
|I|S|S|S| (4) |A| (7) | (16/64) |
24-
|N|V|V|V| |S| | (if payload len==126/127) |
25-
| |1|2|3| |K| | |
26-
+-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
27-
| Extended payload length continued, if payload len == 127 |
28-
+ - - - - - - - - - - - - - - - +-------------------------------+
29-
| Payload Data continued ... |
30-
+---------------------------------------------------------------+
18+
+-+-+-+-+-------+-+-------------+-------------------------------+
19+
0 1 2 3
20+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
21+
+-+-+-+-+-------+-+-------------+-------------------------------+
22+
|F|R|R|R| opcode|M| Payload len | Extended payload length |
23+
|I|S|S|S| (4) |A| (7) | (16/64) |
24+
|N|V|V|V| |S| | (if payload len==126/127) |
25+
| |1|2|3| |K| | |
26+
+-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
27+
| Extended payload length continued, if payload len == 127 |
28+
+ - - - - - - - - - - - - - - - +-------------------------------+
29+
| Payload Data continued ... |
30+
+---------------------------------------------------------------+
3131
'''
3232

3333
FIN = 0x80
@@ -81,12 +81,14 @@ class WebSocketsServer(ThreadingMixIn, TCPServer, API):
8181
allow_reuse_address = True
8282
daemon_threads = True # comment to keep threads alive until finished
8383

84-
# clients is list of dict:
85-
# {
86-
# 'id' : id,
87-
# 'handler' : handler,
88-
# 'address' : (addr, port)
89-
# }
84+
'''
85+
clients is a list of dict:
86+
{
87+
'id' : id,
88+
'handler' : handler,
89+
'address' : (addr, port)
90+
}
91+
'''
9092
clients=[]
9193
id_counter=0
9294

0 commit comments

Comments
 (0)