mirror of
https://github.com/slynn1324/tinypin.git
synced 2026-01-23 02:25:08 +00:00
added notes
This commit is contained in:
parent
d73f429976
commit
b2c4e494ed
2 changed files with 9 additions and 1 deletions
|
|
@ -126,7 +126,10 @@ function decryptCookie(ciphertext){
|
|||
return JSON.parse(deciphered);
|
||||
}
|
||||
|
||||
// broadcast isn't user specific right now...
|
||||
// accept websocket connections. currently are parsing the userid from the path to
|
||||
// map the connections to only notify on changes from the same user.
|
||||
// this simple mapping of holding all connections in memory here won't really scale beyond
|
||||
// one server instance - but that's not really the use case for tinypin.
|
||||
app.ws('/ws/:uid', (ws, req) => {
|
||||
ws.on("message", (msg) => {
|
||||
//console.log("received messsage: " + msg);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
// decorate on web socket functions. if web sockets fail to work, the app should keep working anyway.
|
||||
// if you want to permanently disable websockets, just remove the src include
|
||||
|
||||
// the websocket is ONLY used to broadcast refresh notifications, no interesting data is passed
|
||||
// across the wire. this is done because it can be harder to support certain security and proxy
|
||||
// modes for different browsers, particularly client ssl certifacts are not passed by safari.
|
||||
//
|
||||
// by not passing any interesting data, it's reasonably safe to let the websocket remain open
|
||||
window.socketConnected = false;
|
||||
window.socket = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue