Search code examples
angularjssocketswebrtc

Is socket's "leave" automatically converted to "left" for the receiver?


In my code, I use WebRTC, AngularJS and rtpConnection.

One declare is:

https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js

In my code, I react to the following event:

socket.on("left", somevar)

However, I don't see where this is emitted, I searched just anywhere in my code. But I just don't find any .emit("left" or ".emit('left' in my code.

The only code that is SOMEWHAT related is

 socket.emit('leave', somevar);

But I just don't understand it: "leave" is not "left". The only possible explanation would be that "leave" is internally converted to "left" for the receiver.

Is that actutally the case?

If not, where else could I find this emitting code?


Solution

  • No, socket doesn't do this automatically.

    It's stated in the code somewhere by you.