louiscad
12/12/2017, 9:19 AMreceive() without closing the channel, thus allowing subsequent attempts to get a value from the channel? I assume Channel is not the right choice, but after reading the whole kotlinx.coroutines README, I did not find what I'm looking for.elizarov
12/12/2017, 9:43 AMlouiscad
12/12/2017, 10:07 AMelizarov
12/12/2017, 10:09 AMreceive without closing a channel?louiscad
12/12/2017, 10:13 AMstatus received in the god callback methods (constants starting with GATT_). Note that there's also a famous 133 error value that is not documented, and possibly other unexpected values, that may just be sign of a random failure that may not render the connection unusable or closed though: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/bluetooth/BluetoothGatt.java#71elizarov
12/12/2017, 10:19 AME into the channel I’d simply introduce data class ValueStatus(val value: E, val status: Int) and send it instead to the channel. Then let receive see what status was received and act accordingly (either wait for more or bail out)louiscad
12/12/2017, 10:24 AMreceive() be added so there's no need to "box" what needs to be sent when everything goes with success? I mean, there's probably more use cases that could benefit from this, don't you think?elizarov
12/12/2017, 10:42 AMelizarov
12/12/2017, 10:44 AMlouiscad
12/12/2017, 10:53 AM