SilentShardWebsocketClient

Default Ktor-based WebSocket client implementation.

This provides the core WebSocket functionality using Ktor. Can be extended to add custom logic or used directly.

Constructors

Link copied to clipboard
constructor(websocketConfig: WebsocketConfig)

Functions

Link copied to clipboard
open suspend fun connect(action: T, params: String?)

suspend override fun connect(action: NetworkAction, params: String?)

Perform websocket connection with another party.

Link copied to clipboard
open suspend override fun disconnect()

Perform websocket disconnection with another party.

Link copied to clipboard
open suspend override fun read(): ByteArray

Read mpc bytes from another party.

Link copied to clipboard
open suspend override fun send(bytes: ByteArray)

Send mpc bytes to another party.

open suspend override fun send(text: String)

Send mpc text to another party.

Link copied to clipboard
suspend fun sendPostRequest(action: NetworkAction, authHeader: String?, body: Any): ByteArray

Send a post-request to another party.