mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-17 01:16:27 +01:00
29 lines
471 B
TypeScript
29 lines
471 B
TypeScript
|
import StreamManager from './stream-manager';
|
||
|
import Stream from './stream';
|
||
|
|
||
|
export class OthelloStream extends Stream {
|
||
|
constructor(me) {
|
||
|
super('othello', {
|
||
|
i: me.token
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class OthelloStreamManager extends StreamManager<OthelloStream> {
|
||
|
private me;
|
||
|
|
||
|
constructor(me) {
|
||
|
super();
|
||
|
|
||
|
this.me = me;
|
||
|
}
|
||
|
|
||
|
public getConnection() {
|
||
|
if (this.connection == null) {
|
||
|
this.connection = new OthelloStream(this.me);
|
||
|
}
|
||
|
|
||
|
return this.connection;
|
||
|
}
|
||
|
}
|