Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
03b8df99
Commit
03b8df99
authored
Sep 13, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
eba45937
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
im-center/app/config/socket.server2.js
+2
-3
No files found.
im-center/app/config/socket.server2.js
View file @
03b8df99
...
@@ -65,7 +65,7 @@ class SocketServer {
...
@@ -65,7 +65,7 @@ class SocketServer {
});
});
// this.server.adapter(redisAdapter({ pubClient: redisClient.client, subClient: redisClient.subclient }));
// this.server.adapter(redisAdapter({ pubClient: redisClient.client, subClient: redisClient.subclient }));
this
.
server
.
engine
.
generateId
=
(
req
)
=>
{
this
.
server
.
engine
.
generateId
=
(
req
)
=>
{
console
.
log
(
req
.
headers
)
//
console.log(req.headers)
return
"custom:id:"
+
this
.
getUUID
();
// custom id must be unique
return
"custom:id:"
+
this
.
getUUID
();
// custom id must be unique
}
}
this
.
init
()
this
.
init
()
...
@@ -79,8 +79,7 @@ class SocketServer {
...
@@ -79,8 +79,7 @@ class SocketServer {
var
self
=
this
.
server
;
var
self
=
this
.
server
;
this
.
server
.
on
(
'connection'
,
function
(
client
)
{
this
.
server
.
on
(
'connection'
,
function
(
client
)
{
console
.
log
(
"connection.....socket"
);
console
.
log
(
"connection.....socket"
);
client
.
emit
(
"news"
,
{
ok
:
"ddd"
})
client
.
on
(
"login"
,
(
d
)
=>
{
client
.
on
(
"shandle"
,
(
d
)
=>
{
console
.
log
(
d
)
console
.
log
(
d
)
})
})
//
//
...
...
Write
Preview
Markdown
is supported
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