https://github.com/web-platform-tests/wpt
Raw File
Tip revision: d1d4c61e1e4350f9bc747ccb58db22ec74cc4402 authored by plehegar on 04 November 2014, 23:39:47 UTC
test_child_document.html
Tip revision: d1d4c61
echo_raw_wsh.py
#!/usr/bin/python

from mod_pywebsocket import msgutil
import urllib


def web_socket_do_extra_handshake(request):
    pass  # Always accept.

def web_socket_transfer_data(request):
    while True:
        line = msgutil.receive_message(request)
        if line == 'exit':
            return
        request.connection.write(line.decode("string-escape"))
back to top