file_ws_backend_wsh.py (336B)
1 from mod_pywebsocket import msgutil 2 3 4 def web_socket_do_extra_handshake(request): 5 pass 6 7 8 def web_socket_transfer_data(request): 9 while not request.client_terminated: 10 resp = msgutil.receive_message(request) 11 msgutil.send_message(request, resp, binary=isinstance(resp, bytes)) 12 13 msgutil.close_connection(request)