orangy
coder82
08/28/2018, 10:16 PMmkporwit
08/30/2018, 2:32 AMmkporwit
08/30/2018, 2:38 AMbdawg.io
08/30/2018, 2:45 AMcy
08/30/2018, 8:14 AMkotlinx-coroutines-io
has been moved to kotlinx-io
https://github.com/Kotlin/kotlinx-io
Use compile 'org.jetbrains.kotlinx:kotlinx-coroutines-io:0.1.0-alpha-4'
From a thread in #coroutinesuli
08/30/2018, 9:08 AMNikky
08/30/2018, 12:00 PMrespondHtml {...}
josephivie
09/01/2018, 8:31 PMБежан Александр
09/03/2018, 3:11 PMБежан Александр
09/05/2018, 10:37 AMБежан Александр
09/05/2018, 10:42 AMuninstallFeature()
Albert
09/05/2018, 1:10 PM[nettyCallPool-4-20] WARN io.netty.channel.nio.NioEventLoop - Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@61246795.
What does this exactly mean? I use the following for testing:
ab -k -n 100000 -c 500 <http://localhost:8080/test>
Albert
09/05/2018, 1:14 PMNikky
09/05/2018, 4:26 PMktor-client-cio
righ now anyway because i use 1.3-M2, but i plan to.. so i have some questions
can it open a connection and keep it open for data to come in? the api sends data whenever a chatmessage happens on the bridge.. and almost all other more advanced http clients autoclose connections for me and it is a lot more work than to just implement it in java stdlib (ugly but works)
thats not gonna work going forward since i plan to try to minimize jvm specific dependencies thoughNikky
09/05/2018, 4:30 PM"<http://url.com/stream>".getChunked()
.onChunk { body: String ->
}
.holdConnection()
would be nice..enleur
09/06/2018, 4:24 PMenleur
09/06/2018, 4:57 PMcy
09/07/2018, 9:04 AMFallback
phase? We are thinking of deprecating itbdawg.io
09/07/2018, 5:26 PMDeactivated User
09/07/2018, 7:21 PMRobert Menke
09/09/2018, 5:54 PMLocation
api able to be used with io.ktor.websocket.webSocket
?Nikky
09/10/2018, 9:53 AMenleur
09/11/2018, 4:21 AMNikky
09/11/2018, 12:53 PMpackage io.ktor.client.features.json
import io.ktor.client.features.json.serializer.KotlinxSerializer
actual fun defaultSerializer(): JsonSerializer = KotlinxSerializer()
Nikky
09/11/2018, 5:48 PMNikky
09/11/2018, 7:33 PMNikky
09/11/2018, 7:49 PMNikky
09/11/2018, 9:09 PMoverride suspend fun read(type: TypeInfo, response: HttpResponse): Any {
val reified = type.reifiedType
if(reified is ParameterizedType) {
val arguments = reified.actualTypeArguments
val first = arguments.first()
if(first is WildcardType) {
val upperFirst = first.upperBounds.first()
println("upper bound: $upperFirst")
println("upper bound::class ${upperFirst::class}")
val kclass = kotlin.jvm.internal.ClassReference(upperFirst as Class<*>)
val serializer = when {
type.type == List::class -> kclass.serializer().list
type.type == Set::class -> kclass.serializer().set
else -> {
throw IllegalStateException("WildcardType '${type.reifiedType.typeName}' is not implemented")
}
}
return json.parse(serializer, response.readText())
}
}
return json.parse(type.type.serializer(), response.readText())
}