rtc-io / rtc-switchboard

Node server side in memory signaller for rtc.io components
http://www.rtc.io/modules.html
57 stars 36 forks source link

Reannounce Handling - Room Reallocation #11

Closed DamonOehlman closed 10 years ago

DamonOehlman commented 10 years ago

As the rtc-signaller is designed to allow multiple announce messages, the switchboard needs to fall in line here. As such, the switchboard should be able to handle the following scenarios using a signaller.

Reannounce with room specified

signaller.announce();
signaller.send('hello');
signaller.announce({ room: 'testroom'});
signaller.send('hi there');

Expected behaviour would be that switchboard instance of the peer would be allocated to testroom from the __default room that is used when no room is specified in the announce. The hello message would be delivered to __default room participants whereas hi there would only be delivered to members of testroom.

Change room on re-announce

signaller.announce({ room: 'room1' });
signaller.send('hello');
signaller.announce({ room: 'room2' });
signaller.send('hi there');

Expected behaviour is that the switchboard instance of the peer would be first allocated to room1 and then allocated to room2 when the second announce message was received. Thus the hello message would be delivered to peers connected to the room1 room and the hi there message would be received by peers connected to the room2 room.

DamonOehlman commented 10 years ago

This functionality has been tested and validated against rtc-signaller@0.6