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 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/client/app/common/scripts/streaming/notes-stats.ts (limited to 'src/client/app/common/scripts/streaming/notes-stats.ts') 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; + } +} -- cgit v1.2.3-freya