Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var clients = {};
- var ws = new WebSocketServer.Server({
- port: 3000
- });
- ws.on('connection', function(ws) {
- var id = random(1, 100) // min, - max
- clients[id] = ws;
- });
- # ...
- var clients = {
- questions: {
- 324: <ws_object>
- }
- }
- {type: "auth", login: "user", pass: "password"}
- {type: "auth", status: false}
- var clients = {
- questions: {
- 324: <ws_object>
- }
- }
- qid | uid
- 324 | 54
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement