1
0
forked from mirror/misskey
mi.moris.day/src/client/app/common/scripts/streaming/server.ts

31 lines
536 B
TypeScript
Raw Normal View History

2018-03-07 17:48:32 +09:00
import Stream from './stream';
import StreamManager from './stream-manager';
2018-04-29 21:37:51 +09:00
import MiOS from '../../../mios';
2018-03-07 17:48:32 +09:00
/**
* Server stream connection
*/
export class ServerStream extends Stream {
2018-03-15 19:53:46 +09:00
constructor(os: MiOS) {
super(os, 'server');
2018-03-07 17:48:32 +09:00
}
}
export class ServerStreamManager extends StreamManager<ServerStream> {
2018-03-15 19:53:46 +09:00
private os: MiOS;
constructor(os: MiOS) {
super();
this.os = os;
}
2018-03-07 17:48:32 +09:00
public getConnection() {
if (this.connection == null) {
2018-03-15 19:53:46 +09:00
this.connection = new ServerStream(this.os);
2018-03-07 17:48:32 +09:00
}
return this.connection;
}
}