From c78945436e39121f46e083eac7a6572ca2efe2d2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 9 Jun 2018 04:14:26 +0900 Subject: #1686 --- .../app/common/scripts/streaming/notes-stats.ts | 30 ++++++++++++++++++++++ .../app/common/scripts/streaming/server-stats.ts | 30 ++++++++++++++++++++++ src/client/app/common/scripts/streaming/server.ts | 30 ---------------------- 3 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 src/client/app/common/scripts/streaming/notes-stats.ts create mode 100644 src/client/app/common/scripts/streaming/server-stats.ts delete mode 100644 src/client/app/common/scripts/streaming/server.ts (limited to 'src/client/app/common/scripts') diff --git a/src/client/app/common/scripts/streaming/notes-stats.ts b/src/client/app/common/scripts/streaming/notes-stats.ts new file mode 100644 index 0000000000..9e3e78a709 --- /dev/null +++ b/src/client/app/common/scripts/streaming/notes-stats.ts @@ -0,0 +1,30 @@ +import Stream from './stream'; +import StreamManager from './stream-manager'; +import MiOS from '../../../mios'; + +/** + * Notes stats stream connection + */ +export class NotesStatsStream extends Stream { + constructor(os: MiOS) { + super(os, 'notes-stats'); + } +} + +export class NotesStatsStreamManager extends StreamManager { + private os: MiOS; + + constructor(os: MiOS) { + super(); + + this.os = os; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new NotesStatsStream(this.os); + } + + return this.connection; + } +} diff --git a/src/client/app/common/scripts/streaming/server-stats.ts b/src/client/app/common/scripts/streaming/server-stats.ts new file mode 100644 index 0000000000..9983dfcaf0 --- /dev/null +++ b/src/client/app/common/scripts/streaming/server-stats.ts @@ -0,0 +1,30 @@ +import Stream from './stream'; +import StreamManager from './stream-manager'; +import MiOS from '../../../mios'; + +/** + * Server stats stream connection + */ +export class ServerStatsStream extends Stream { + constructor(os: MiOS) { + super(os, 'server-stats'); + } +} + +export class ServerStatsStreamManager extends StreamManager { + private os: MiOS; + + constructor(os: MiOS) { + super(); + + this.os = os; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new ServerStatsStream(this.os); + } + + return this.connection; + } +} diff --git a/src/client/app/common/scripts/streaming/server.ts b/src/client/app/common/scripts/streaming/server.ts deleted file mode 100644 index 2ea4239288..0000000000 --- a/src/client/app/common/scripts/streaming/server.ts +++ /dev/null @@ -1,30 +0,0 @@ -import Stream from './stream'; -import StreamManager from './stream-manager'; -import MiOS from '../../../mios'; - -/** - * Server stream connection - */ -export class ServerStream extends Stream { - constructor(os: MiOS) { - super(os, 'server'); - } -} - -export class ServerStreamManager extends StreamManager { - private os: MiOS; - - constructor(os: MiOS) { - super(); - - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new ServerStream(this.os); - } - - return this.connection; - } -} -- cgit v1.2.3-freya