summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/server-stream-manager.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-13 18:05:35 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-13 18:05:35 +0900
commitbc9a8283c66d7588f931d4b802f7ab1fa7aa3226 (patch)
treecac529d136737c95b1656564756da8c4ae84df32 /src/web/app/common/scripts/server-stream-manager.ts
parent:v: (diff)
downloadmisskey-bc9a8283c66d7588f931d4b802f7ab1fa7aa3226.tar.gz
misskey-bc9a8283c66d7588f931d4b802f7ab1fa7aa3226.tar.bz2
misskey-bc9a8283c66d7588f931d4b802f7ab1fa7aa3226.zip
なんかもうめっちゃ変えた
Diffstat (limited to 'src/web/app/common/scripts/server-stream-manager.ts')
-rw-r--r--src/web/app/common/scripts/server-stream-manager.ts31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/web/app/common/scripts/server-stream-manager.ts b/src/web/app/common/scripts/server-stream-manager.ts
index 54333c8cf5..a170daebb9 100644
--- a/src/web/app/common/scripts/server-stream-manager.ts
+++ b/src/web/app/common/scripts/server-stream-manager.ts
@@ -1,14 +1,7 @@
+import StreamManager from './stream-manager';
import Connection from './server-stream';
-import * as uuid from 'uuid';
-
-export default class ServerStreamManager {
- private connection = null;
-
- /**
- * コネクションを必要としているユーザー
- */
- private users = [];
+export default class ServerStreamManager extends StreamManager<Connection> {
public getConnection() {
if (this.connection == null) {
this.connection = new Connection();
@@ -16,24 +9,4 @@ export default class ServerStreamManager {
return this.connection;
}
-
- public use() {
- // ユーザーID生成
- const userId = uuid();
-
- this.users.push(userId);
-
- return userId;
- }
-
- public dispose(userId) {
- this.users = this.users.filter(id => id != userId);
-
- // 誰もコネクションの利用者がいなくなったら
- if (this.users.length == 0) {
- // コネクションを切断する
- this.connection.close();
- this.connection = null;
- }
- }
}