DevToolsConnection

class DevToolsConnection(serverUrl: String)(source)

WebSocket connection to DevTools server.

The transport is shared across every platform. Only the underlying ktor engine is platform specific, supplied by devToolsHttpClientEngine.

Constructors

Link copied to clipboard
constructor(serverUrl: String)

Properties

Link copied to clipboard

Current connection state.

Functions

Link copied to clipboard
suspend fun connect(clientId: String, clientName: String, platform: String)

Connects to the DevTools server and sends registration.

Link copied to clipboard
suspend fun disconnect()
Link copied to clipboard
fun observeMessages(handler: suspend (DevToolsMessage) -> Unit)

Registers a handler for incoming messages from the server.

Link copied to clipboard
suspend fun send(message: DevToolsMessage): Boolean

Sends a message to the server.