Compare commits
1
Commits
563ee98d03
...
v1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
126a3bfff2
|
@@ -15,7 +15,7 @@ sealed class CSERoute<TParams, TEvent: Any>(val path: String, val elevation: Ele
|
|||||||
abstract fun extractParams(reqParams: Parameters): TParams?
|
abstract fun extractParams(reqParams: Parameters): TParams?
|
||||||
|
|
||||||
suspend fun call(client: IClient, params: TParams, body: suspend (sender: suspend (TEvent) -> Unit) -> Unit): Either<ErrorResponse, Unit> {
|
suspend fun call(client: IClient, params: TParams, body: suspend (sender: suspend (TEvent) -> Unit) -> Unit): Either<ErrorResponse, Unit> {
|
||||||
val server = client.serverUrl.replace("https", "ws").replace("http", "ws")
|
val server = if(client.serverUrl.startsWith("http")) client.serverUrl.replace("http", "ws") else "ws://${client.serverUrl}"
|
||||||
var error: ErrorResponse? = null
|
var error: ErrorResponse? = null
|
||||||
try {
|
try {
|
||||||
client.client.webSocket("$server${buildUrl(params)}", {}) {
|
client.client.webSocket("$server${buildUrl(params)}", {}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user