我正在使用快速框架。我想從socket.io訪問會話數據。我嘗試使用client.listener.server.dynamicViewHelpers數據來表達dynamicHelpers,但無法獲取會話數據。有沒有簡單的方法可以做到這一點?請看代碼app.listen(3000);var io = require('socket.io');var io = io.listen(app);io.on('connection', function(client){ // I want to use session data here client.on('message', function(message){ // or here }); client.on('disconnect', function(){ // or here }); });
socket.io和會話?
慕婉清6462132
2019-10-05 14:58:39