0
請問,如何使用uWebSockets獲取發件人IP地址?使用uWebSockets獲取IP地址
const wss = new uws.Server({
server: server,
perMessageDeflate: false
});
wss.on(`connection`, ws => {
ws.remoteAddress = ws.upgradeReq.connection.remoteAddress;
console.log(`user connected: `, ws.remoteAddress);
});
用戶連接是undefined