rpc

suspend fun rpc(method: String, paramsJson: String?, isNotificationRequest: Boolean = false, timeoutMillis: Long = DEFAULT_RPC_TIMEOUT_MILLIS): SoraRpcResult?

RPC を呼び出します.

Return

呼び出し結果。 Notification の場合は null

Parameters

method

呼び出すメソッド

paramsJson

パラメータの JSON 文字列。無効な JSON の場合は PARSE_ERROR

isNotificationRequest

Notification として送信する場合は true

timeoutMillis

タイムアウト時間

Throws

RPC を利用できない場合や送信に失敗した場合