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