summaryrefslogtreecommitdiff
path: root/src/server/api/streaming.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/server/api/streaming.ts
parentサーバーの統計情報をメモリに記憶するようにするなど (diff)
downloadsharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.tar.gz
sharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.tar.bz2
sharkey-c78945436e39121f46e083eac7a6572ca2efe2d2.zip
#1686
Diffstat (limited to 'src/server/api/streaming.ts')
-rw-r--r--src/server/api/streaming.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/api/streaming.ts b/src/server/api/streaming.ts
index 6825b6336a..2d4cfc108f 100644
--- a/src/server/api/streaming.ts
+++ b/src/server/api/streaming.ts
@@ -12,7 +12,8 @@ import messagingStream from './stream/messaging';
import messagingIndexStream from './stream/messaging-index';
import othelloGameStream from './stream/othello-game';
import othelloStream from './stream/othello';
-import serverStream from './stream/server';
+import serverStatsStream from './stream/server-stats';
+import notesStatsStream from './stream/notes-stats';
import requestsStream from './stream/requests';
import { ParsedUrlQuery } from 'querystring';
import authenticate from './authenticate';
@@ -28,8 +29,13 @@ module.exports = (server: http.Server) => {
ws.on('request', async (request) => {
const connection = request.accept();
- if (request.resourceURL.pathname === '/server') {
- serverStream(request, connection);
+ if (request.resourceURL.pathname === '/server-stats') {
+ serverStatsStream(request, connection);
+ return;
+ }
+
+ if (request.resourceURL.pathname === '/notes-stats') {
+ notesStatsStream(request, connection);
return;
}