class WebSocketTransport : WebSocketListener
The native side of this class keeps a global reference to the instance on the C-side Remember to call cleanup() when it's no longer needed.
WebSocketTransport(url: String, ignoreFailure: Boolean = false)
The native side of this class keeps a global reference to the instance on the C-side Remember to call cleanup() when it's no longer needed. |
val ptr: Long |
fun cleanup(): Unit
This should be called after the RemoteShell exits. |
|
fun onClosed(webSocket: WebSocket?, code: Int, reason: String?): Unit |
|
fun onFailure(webSocket: WebSocket?, t: Throwable?, response: Response?): Unit |
|
fun onMessage(webSocket: WebSocket?, text: String?): Unit fun onMessage(webSocket: WebSocket?, bytes: ByteString?): Unit |
|
fun receive(): ByteArray
returns an empty array if the websocket is closed and the remote shell should terminate. |
|
fun send(data: ByteArray): Boolean |