I
I
Ilya2017-05-18 12:31:19
Node.js
Ilya, 2017-05-18 12:31:19

What is the analog of the type "on.data" in socket.io?

Hello! The question may be stupid, but I did not find the answer.
using node.js + socket.io on centOS
I need to handle ALL events regardless of client or event name.
Somewhere there was a construction .on("data".....
but it doesn't work in socket.io, is there a similar way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-05-18
@From11

https://github.com/hden/socketio-wildcard
socket.on('*', function(){ /* … */ })

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question