pull/32/head
kunfei 5 years ago
parent b2401f60e0
commit 00e5da3683
  1. 13
      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
}
}
Loading…
Cancel
Save