Custom Signaling Server

I am building a custom signaling server backed by Firestore.

I am using y-webrtc.js as a guide.

The Room class in y-webrtc.js emits a “peers” message at several points with code of the form:

room.provider.emit('peers', [{...}])

But I haven’t been able to find any subsystem that consumes the “peers” message.

What is the purpose of the “peers” message, and how should it be handled?