projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prevent_reuse as input hidden DOM item
[brisk.git]
/
web
/
ws.php
diff --git
a/web/ws.php
b/web/ws.php
index
640c227
..
a21eb6f
100644
(file)
--- a/
web/ws.php
+++ b/
web/ws.php
@@
-1,5
+1,5
@@
<?php
<?php
-
+
?>
<html>
<head>
?>
<html>
<head>
@@
-16,13
+16,13
@@
window.onload = function() {
var host = "ws://dodo.birds.van/brisk/xynt_test01.php?isstream=true&transp=websocket&f_test=1"; // SET THIS TO YOUR SERVER
window.onload = function() {
var host = "ws://dodo.birds.van/brisk/xynt_test01.php?isstream=true&transp=websocket&f_test=1"; // SET THIS TO YOUR SERVER
-
+
console.log("QUI");
try
{
socket = new WebSocket(host);
console.log('WebSocket - status ' + socket.readyState);
console.log("QUI");
try
{
socket = new WebSocket(host);
console.log('WebSocket - status ' + socket.readyState);
-
+
socket.onopen = function(msg)
{
if(this.readyState == 1)
socket.onopen = function(msg)
{
if(this.readyState == 1)
@@
-30,30
+30,30
@@
console.log("We are now connected to websocket server. readyState = " + this.readyState);
}
};
console.log("We are now connected to websocket server. readyState = " + this.readyState);
}
};
-
+
//Message received from websocket server
socket.onmessage = function(msg)
{
console.log(" [ + ] Received: " + msg.data);
};
//Message received from websocket server
socket.onmessage = function(msg)
{
console.log(" [ + ] Received: " + msg.data);
};
-
+
//Connection closed
socket.onclose = function(msg)
{
console.log("Disconnected - status " + this.readyState);
};
//Connection closed
socket.onclose = function(msg)
{
console.log("Disconnected - status " + this.readyState);
};
-
+
socket.onerror = function()
{
console.log("Some error");
}
}
socket.onerror = function()
{
console.log("Some error");
}
}
-
+
catch(ex)
{
console.log('Some exception : ' + ex);
}
catch(ex)
{
console.log('Some exception : ' + ex);
}
-
+
};
//-->
</script>
};
//-->
</script>