comparison mod_websocket/websocket.html @ 848:14e10bce7463

mod_websocket: Update example HTML
author Florian Zeitz <florob@babelmonkeys.de>
date Mon, 15 Oct 2012 20:56:15 +0200
parents 5fc00a3e47b5
children 24f6540c1eaf
comparison
equal deleted inserted replaced
847:1c9a3454eb43 848:14e10bce7463
1
2
3 <!DOCTYPE html> 1 <!DOCTYPE html>
4 <html> 2 <html>
5 <head> 3 <head>
6 <title>XMPP Websocket</title> 4 <title>XMPP Websocket</title>
7 <script type="text/javascript"> 5 <script type="text/javascript">
8 if ("WebSocket" in window) { 6 if ("WebSocket" in window) {
9 var ws = new WebSocket("ws://localhost:5281/xmpp-websocket"); 7 var ws = new WebSocket("ws://localhost:5280/xmpp-websocket/", "xmpp");
10 ws.onopen = function() { 8 ws.onopen = function() {
11 ws.send("<stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>"); 9 ws.send("<stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>");
12 }; 10 };
13 ws.onmessage = function (evt) { 11 ws.onmessage = function (evt) {
14 var message = evt.data; 12 var message = evt.data;