François Richard
François Richard

Reputation: 7045

override socketio listener (settings several similar listener)

what is happening if I write

socket.on('db' , function() {
    //Execute set of actions 1
});

socket.on('db' , function() {
    //Execute set of actions 2
});

What set of action will be executed ? is one overriding the other?

Upvotes: 0

Views: 19

Answers (1)

Aurelia
Aurelia

Reputation: 1062

socket is an EventEmitter, so both fire.

Upvotes: 1

Related Questions