OLD | NEW |
1 from mod_pywebsocket import common | 1 from mod_pywebsocket import common |
2 from mod_pywebsocket import stream | 2 from mod_pywebsocket import stream |
3 | 3 |
4 | 4 |
5 def web_socket_do_extra_handshake(request): | 5 def web_socket_do_extra_handshake(request): |
6 pass | 6 pass |
7 | 7 |
8 | 8 |
9 def web_socket_transfer_data(request): | 9 def web_socket_transfer_data(request): |
10 # A new frame is arrived before the previous fragmented frame has finished. | 10 # A new frame is arrived before the previous fragmented frame has finished. |
11 request.connection.write(stream.create_text_frame('This message ', opcode=co
mmon.OPCODE_TEXT, fin=0)) | 11 request.connection.write(stream.create_text_frame('This message ', opcode=co
mmon.OPCODE_TEXT, fin=0)) |
12 request.connection.write(stream.create_text_frame('should be ignored.', opco
de=common.OPCODE_TEXT, fin=1)) # Not OPCODE_CONTINUATION. | 12 request.connection.write(stream.create_text_frame('should be ignored.', opco
de=common.OPCODE_TEXT, fin=1)) # Not OPCODE_CONTINUATION. |
OLD | NEW |