How to get event details in middleware for socket.io
问题 I am trying to log the event name and parameter for each event on my Node server. For this purpose I used io.use(function(socket, next){ // how to get event name out of socket. }); Now, I got stuck while trying to get event name and arguments. To me, it looks like common demand from API dev, so I am pretty sure there must be some way to the library to get that, I have tried to read the docs and source but I am not able to get the stuff. 回答1: The socket events needs to be handled properly,in