From 0adc5ecf270905d565ff7dfc460f0967f356d32a Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Sun, 5 Jan 2020 12:31:46 +0100 Subject: Upgrade to Krossbow 0.4.1 --- .../org/luxons/sevenwonders/client/SevenWondersClient.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sw-client/src') diff --git a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt index 70cefbcc..691a3f0a 100644 --- a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt +++ b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt @@ -3,8 +3,8 @@ package org.luxons.sevenwonders.client import kotlinx.coroutines.channels.ReceiveChannel import kotlinx.coroutines.channels.map import org.hildan.krossbow.client.KrossbowClient -import org.hildan.krossbow.engines.KrossbowSession -import org.hildan.krossbow.engines.KrossbowSubscription +import org.hildan.krossbow.client.KrossbowSession +import org.hildan.krossbow.client.KrossbowSubscription import org.luxons.sevenwonders.model.CustomizableSettings import org.luxons.sevenwonders.model.GameState import org.luxons.sevenwonders.model.PlayerTurnInfo @@ -29,12 +29,12 @@ class SevenWondersClient { } } -suspend inline fun KrossbowSession.request( +suspend inline fun KrossbowSession.request( sendDestination: String, receiveDestination: String, - payload: Any? = null -): T { - val sub = subscribe(receiveDestination) + payload: T? = null +): U { + val sub = subscribe(receiveDestination) send(sendDestination, payload) val msg = sub.messages.receive() sub.unsubscribe() -- cgit