From 00e5da3683e0604ab8f375daf0aa2a15afc82c3e Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 1 Sep 2019 12:23:18 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/web/WebSocketServer.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/src/main/java/io/legado/app/web/WebSocketServer.kt diff --git a/app/src/main/java/io/legado/app/web/WebSocketServer.kt b/app/src/main/java/io/legado/app/web/WebSocketServer.kt new file mode 100644 index 000000000..c885a1e0a --- /dev/null +++ b/app/src/main/java/io/legado/app/web/WebSocketServer.kt @@ -0,0 +1,13 @@ +package io.legado.app.web + +import fi.iki.elonen.NanoWSD +import io.legado.app.web.controller.SourceDebugWebSocket + +class WebSocketServer(port: Int) : NanoWSD(port) { + + override fun openWebSocket(handshake: IHTTPSession): WebSocket? { + return if (handshake.uri == "/sourceDebug") { + SourceDebugWebSocket(handshake) + } else null + } +}