Skip to content

Commit

Permalink
NEW TEMPORARY VERSION
Browse files Browse the repository at this point in the history
1.4.41 and 1.4.45 are TEMPORARY until typescript support comes out for it, the usage of the repo won't change though
Y0ursTruly authored Jul 19, 2024
1 parent f26a2da commit 1cf3bad
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webject",
"version": "1.4.41",
"version": "1.4.45",
"description": "Share Objects Online with the power of websockets. Keys, Values AND references. Webject is short for Web Object and it really is a system for sharing objects on the web. Someone can host an object, and make authTokens for others online to share this object",
"main": "webject.js",
"scripts": {
4 changes: 2 additions & 2 deletions webject.js
Original file line number Diff line number Diff line change
@@ -226,9 +226,7 @@
if(encodingStorage.has(key)) return client.close(1002); //reused authentication rejected
encodingStorage.set(key,performance.now())
//there is an interval a good bit above that dumps these keys after they're a second old (after they're already invalid)
client.on('pong',function(){client.isAlive=true})
encodingHandled=true
client.isAlive=true
msg=msg[0]
}
else if(!authTokens.get(msg)) return client.close(1000); //if you client doesn't have a valid token, they get closed
@@ -239,6 +237,8 @@

if(!token.encoder) client.send(objToString(token.object,true));
else client.send( await token.encoder(objToString(token.object,true)) );
client.on('pong',function(){client.isAlive=true})
client.isAlive=true
client.token=token
token.clients.set(client,1)
dispatch("connect",token,client)

0 comments on commit 1cf3bad

Please sign in to comment.