handling connections in general, and so now we have two rooms to manage

This commit is contained in:
talksik
2022-05-06 10:15:58 -05:00
parent eb483d4cd9
commit 61c2ac14af
3 changed files with 77 additions and 95 deletions
+19 -2
View File
@@ -18,8 +18,10 @@ enum SocketChannels {
* when someone connects to a line, whether tuned in or not
*/
CONNECT_TO_LINE = "CONNECT_TO_LINE",
SOMEONE_CONNECTED_TO_LINE = "SOMEONE_CONNECTED_TO_LINE",
TUNE_TO_LINE = "TUNE_TO_LINE",
SOMEONE_TUNED_TO_LINE = "SOMEONE_TUNED_TO_LINE",
}
export default SocketChannels;
@@ -28,5 +30,20 @@ export class ConnectToLine {
constructor(public lineId: string) {}
}
export class SomeoneConnected {
constructor(public lineId: string, public userId: string) {}
constructor(
public lineId: string,
public userId: string,
public allConnectedIntoUserIds: string[]
) {}
}
export class TuneToLine {
constructor(public lineId: string, public keepTunedIn: boolean = false) {}
}
export class SomeoneTuned {
constructor(
public lineId: string,
public userId: string,
public allTunedIntoUserIds: string[]
) {}
}