https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 105aa9b5f1a2cd3ab4f2d4cbf9db2cd9a0c7bd39 authored by jgraham on 28 March 2018, 19:03:58 UTC
fixup! Fix indentation
Tip revision: 105aa9b
protocol_array_wsh.py
#!/usr/bin/python

from mod_pywebsocket import msgutil, util

def web_socket_do_extra_handshake(request):
    line = request.headers_in.get('Sec-WebSocket-Protocol')
    request.ws_protocol = line.split(',', 1)[0]

#pass

def web_socket_transfer_data(request):
    while True:
        msgutil.send_message(request, request.ws_protocol)
        return
back to top