Mercurial > prosody-modules
annotate mod_websocket/websocket.html @ 1200:34216cdffda6
mod_auth_imap: unfortunately large commit which adds support for SSL (including cert verification), appending the realm to usernames, and various IMAP protocol fixes
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Sep 2013 18:14:45 +0100 |
parents | 14e10bce7463 |
children | 24f6540c1eaf |
rev | line source |
---|---|
129 | 1 <!DOCTYPE html> |
2 <html> | |
3 <head> | |
4 <title>XMPP Websocket</title> | |
5 <script type="text/javascript"> | |
6 if ("WebSocket" in window) { | |
848
14e10bce7463
mod_websocket: Update example HTML
Florian Zeitz <florob@babelmonkeys.de>
parents:
129
diff
changeset
|
7 var ws = new WebSocket("ws://localhost:5280/xmpp-websocket/", "xmpp"); |
129 | 8 ws.onopen = function() { |
9 ws.send("<stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>"); | |
10 }; | |
11 ws.onmessage = function (evt) { | |
12 var message = evt.data; | |
13 alert ("Received frame: " + message); | |
14 }; | |
15 ws.onclose = function() { | |
16 alert ("Disconnected"); | |
17 }; | |
18 } else { | |
19 alert ("Your browser doesn't implement WebSocket !"); | |
20 } | |
21 </script> | |
22 </head> | |
23 <body> | |
24 </body> | |
25 </html> |