Commit 03b8df99 by 蒋勇

d

parent eba45937
......@@ -65,7 +65,7 @@ class SocketServer {
});
// this.server.adapter(redisAdapter({ pubClient: redisClient.client, subClient: redisClient.subclient }));
this.server.engine.generateId = (req) => {
console.log(req.headers)
// console.log(req.headers)
return "custom:id:" + this.getUUID(); // custom id must be unique
}
this.init()
......@@ -79,8 +79,7 @@ class SocketServer {
var self = this.server;
this.server.on('connection', function (client) {
console.log("connection.....socket");
client.emit("news", { ok: "ddd" })
client.on("shandle", (d) => {
client.on("login", (d) => {
console.log(d)
})
//
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment