var WebSocketServer = require("D:/0.ProgramFiles/2.Devel/4.NodeJs/node_modules/ws").Server;
var wss = new WebSocketServer({port: 8888});
var userList = [];
wss.on("connection", function (ws,req) {
console.log("",req.connection.remoteAddress);
// console.log(getUUID());
ws.on("message", function (message) {
console.log(":" + message);
wss.clients.forEach(function each(client) {
client.send(message);
});
});
ws.on("close", function (message) {
console.log("",req.connection.remoteAddress);
});
});
as in the above code, the browser access on your computer is normal, and other ip access pages on the same local area network only display "upgrade required"
.can you tell me how to solve the problem? Thank you
(after inviting several bosses, I thought it might disturb you. If there is any disturbance, I am really sorry ~)