mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 00:04:58 +02:00
sending message in correct format
This commit is contained in:
parent
4e9be8cdd0
commit
eca11d3a99
2 changed files with 13 additions and 9 deletions
|
@ -1,18 +1,22 @@
|
||||||
var HOST = "localhost:5000"
|
// var HOST = "localhost:5000"
|
||||||
// var HOST = "https://thawing-hamlet-8433.herokuapp.com/";
|
var HOST = "desolate-bastion-1742.herokuapp.com";
|
||||||
var client = new WebSocket("ws://" + HOST);
|
var client = new WebSocket("ws://" + HOST);
|
||||||
client.onerror - function() {
|
var score = 1;
|
||||||
console.log("CONNECTION ERROR");
|
var username = GlobalServices.username;
|
||||||
|
client.onerror = function() {
|
||||||
|
print("CONNECTION ERROR");
|
||||||
}
|
}
|
||||||
print("TESSST");
|
print("TESSST");
|
||||||
client.onopen = function() {
|
client.onopen = function() {
|
||||||
print("Web Socket client connected");
|
print("Web Socket client connected");
|
||||||
|
|
||||||
function sendMessage() {
|
function sendMessage() {
|
||||||
// if(client.readyState === client.OPEN) {
|
if(client.readyState === client.OPEN) {
|
||||||
client.send("HEY");
|
|
||||||
Script.setTimeout(sendMessage, 1000);
|
Script.setTimeout(sendMessage, 3000);
|
||||||
// }
|
client.send(JSON.stringify({id: score, username: username, score: score}))
|
||||||
|
score++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sendMessage();
|
sendMessage();
|
||||||
}
|
}
|
|
@ -167,7 +167,7 @@ public:
|
||||||
AvatarData();
|
AvatarData();
|
||||||
virtual ~AvatarData();
|
virtual ~AvatarData();
|
||||||
|
|
||||||
static const QUrl& defaultFullAvatarModelUrl();
|
static const QUrl& defaultFullAvatarcodelUrl();
|
||||||
|
|
||||||
virtual bool isMyAvatar() const { return false; }
|
virtual bool isMyAvatar() const { return false; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue