class DebuggerFramesStream : WebSocketListener
(source)
DebuggerFramesStream represents connection to remote websocket endpoint of the DevTools Protocol (either inspectable page debugger url http://localhost:9222/json or browser debugger url http://localhost:9222/json/version)
DebuggerFramesStream(webSocketUri: String, framesBufferSize: Int, mapper: FrameMapper, webSocketClient: OkHttpClient)
Creates new WebSocketFramesStream for given web webSocketUri, buffer size, frame mapper, and ws client |
fun close(): Unit
Closes stream |
|
fun eventFrames(): Flowable<ResponseFrame>
Returns all frames that represent events from connection. |
|
fun frames(): Flowable<ResponseFrame>
Returns all frames received from connection. |
|
fun <T> getResponse(requestFrame: RequestFrame, clazz: Class<T>): Single<T>
Returns protocol response for given request frame (if any). |
|
fun onClosed(webSocket: WebSocket, code: Int, reason: String): Unit
onClosed is called when websocket is being closed. |
|
fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?): Unit
onFailure is called when websocket protocol error occurs. |
|
fun onMessage(webSocket: WebSocket, text: String): Unit
onMessage is called when new frame arrives on websocket. |
|
fun send(frame: RequestFrame): Single<Boolean>
Sends frame over the connection. |