summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/streaming/server-stats.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/scripts/streaming/server-stats.ts')
-rw-r--r--src/client/app/common/scripts/streaming/server-stats.ts30
1 files changed, 30 insertions, 0 deletions
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<ServerStatsStream> {
+ 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;
+ }
+}