summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/streaming/notes-stats.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-09 04:14:26 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-09 04:14:26 +0900
commitc78945436e39121f46e083eac7a6572ca2efe2d2 (patch)
treeb26036a9f38bda54b865e704f8bcd477f2caac0e /src/client/app/common/scripts/streaming/notes-stats.ts
parentサーバーの統計情報をメモリに記憶するようにするなど (diff)
downloadsharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.tar.gz
sharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.tar.bz2
sharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.zip
#1686
Diffstat (limited to 'src/client/app/common/scripts/streaming/notes-stats.ts')
-rw-r--r--src/client/app/common/scripts/streaming/notes-stats.ts30
1 files changed, 30 insertions, 0 deletions
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<NotesStatsStream> {
+ 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;
+ }
+}