Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sweng-group-15
signalbuddy
Commits
2d447e91
Commit
2d447e91
authored
Oct 11, 2019
by
Moritz Langenstein
Browse files
(ml5717) Updated socket.io version
parent
5da4e707
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
package-lock.json
0 → 100644
View file @
2d447e91
This diff is collapsed.
Click to expand it.
package.json
View file @
2d447e91
...
...
@@ -5,9 +5,9 @@
"dependencies"
:
{
"
farmhash
"
:
"
^2.1.0
"
,
"
getconfig
"
:
"
^4.3.0
"
,
"
node-
uuid
"
:
"
1.2.0
"
,
"
socket.io
"
:
"
^
1.7.4
"
,
"
socket.io-redis
"
:
"
4.0.1
"
,
"
uuid
"
:
"
^3.3.3
"
,
"
socket.io
"
:
"
^
2.3.0
"
,
"
socket.io-redis
"
:
"
5.2.0
"
,
"
sticky-session
"
:
"
^1.1.2
"
},
"main"
:
"dist/server.js"
,
...
...
src/sockets.js
View file @
2d447e91
import
socketIO
from
'
socket.io
'
;
import
uuid
from
'
node-
uuid
'
;
import
uuid
v4
from
'
uuid
/v4
'
;
import
crypto
from
'
crypto
'
;
import
redisAdapter
from
'
socket.io-redis
'
;
import
{
safeCb
}
from
'
./util
'
;
...
...
@@ -96,10 +96,10 @@ export default (server, config) => {
client
.
on
(
'
create
'
,
(
name
,
cb
)
=>
{
if
(
arguments
.
length
===
2
)
{
cb
=
(
typeof
cb
===
'
function
'
)
?
cb
:
()
=>
{};
name
=
name
||
uuid
();
name
=
name
||
uuid
v4
();
}
else
{
cb
=
name
;
name
=
uuid
();
name
=
uuid
v4
();
}
// check if exists
io
.
in
(
name
).
clients
((
err
,
clients
)
=>
{
...
...
yarn.lock
deleted
100644 → 0
View file @
5da4e707
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment