WebSocketTransport
//fluxbase-kotlin/io.github.nimbleflux.fluxbase.realtime/WebSocketTransport
WebSocketTransport
Section titled “WebSocketTransport”interface WebSocketTransport
SPI for WebSocket I/O — the seam where tests inject a fake transport (see FakeWebSocketTransport) instead of a real WS connection.
The real implementation uses Ktor’s WebSocket client; the fake simulates server messages via FakeWebSocketTransport.simulateMessage.
Inheritors
Section titled “Inheritors”| KtorWebSocketTransport |
Properties
Section titled “Properties”| Name | Summary |
|---|---|
| isConnected | [jvm] abstract val isConnected: Boolean Whether the transport is currently connected. |
Functions
Section titled “Functions”| Name | Summary |
|---|---|
| close | [jvm] abstract fun close() Close the connection. |
| connect | [jvm] abstract fun connect(url: String): Flow<String> Connect to the given URL and return a flow of incoming JSON text messages. |
| send | [jvm] abstract suspend fun send(text: String) Send a text message. |