OLD | NEW |
1 import re | 1 import re |
2 import struct | 2 import struct |
3 from mod_pywebsocket import common | 3 from mod_pywebsocket import common |
4 | 4 |
5 | 5 |
6 def web_socket_do_extra_handshake(request): | 6 def web_socket_do_extra_handshake(request): |
7 pass | 7 pass |
8 | 8 |
9 | 9 |
10 def web_socket_transfer_data(request): | 10 def web_socket_transfer_data(request): |
(...skipping 12 matching lines...) Expand all Loading... |
23 header += chr(payload_length) # No Mask and two bytes extended payload lengt
h. | 23 header += chr(payload_length) # No Mask and two bytes extended payload lengt
h. |
24 if payload_length == 126: | 24 if payload_length == 126: |
25 header += struct.pack('!H', extended_length) | 25 header += struct.pack('!H', extended_length) |
26 elif payload_length == 127: | 26 elif payload_length == 127: |
27 header += struct.pack('!Q', extended_length) | 27 header += struct.pack('!Q', extended_length) |
28 else: | 28 else: |
29 msgutil.send_message(request, 'FAIL: Query value is incorrect or missing
') | 29 msgutil.send_message(request, 'FAIL: Query value is incorrect or missing
') |
30 return | 30 return |
31 request.connection.write(header) | 31 request.connection.write(header) |
32 request.connection.write('X' * extended_length) | 32 request.connection.write('X' * extended_length) |
OLD | NEW |