1 from mod_pywebsocket
import handshake
4 def web_socket_do_extra_handshake(request
):
5 msg
= 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n'
6 msg
+= ('p' * 1024) + '\r\n'
8 request
.connection
.write(msg
)
9 # Prevents pywebsocket from sending its own handshake message.
10 raise handshake
.AbortedByUserException('Abort the connection')
13 def web_socket_transfer_data(request
):