wouterdoeland
10/12/2018, 2:28 PMbdawg.io
10/12/2018, 4:55 PM0.9.6
release or is the plan to go straight for 1.0
with the Kotlin 1.3
GA coming up?otakusenpai
10/12/2018, 11:00 PMval r = socket.openReadChannel()
println(r.readASCIILine())
This line in the raw sockets section is outdated @ http://ktor.io/servers/raw-sockets.htmljasoet
10/13/2018, 8:53 AMschlan
10/13/2018, 11:33 AMotakusenpai
10/13/2018, 3:46 PMoverride suspend fun receiveUTF8Data(): String? {
var data: String? = null
var cB = StringBuilder(512)
try {
if(!input.readUTF8LineTo(cB,512))
throw Exception("BasicConnection.kt: Didn't receive data from connection!")
else data = cB.toString()
} catch (e: Throwable) {
e.printStackTrace()
socket.close()
connected = false
null
}
return data
}
And the call is lke this
val job = GlobalScope.async { data = conn.receiveUTF8Data() }
job.await()
The errors are as follows:otakusenpai
10/13/2018, 4:39 PMconstructor(Port: Int = 6697,Address: String): super() {
runBlocking {
try {
port = Port
address = Address
socket = aSocket(ActorSelectorManager(ioCoroutineDispatcher)).
tcp().connect(InetSocketAddress(address,port)).tls()
input = socket.openReadChannel()
output = socket.openWriteChannel(autoFlush = false)
connected = true
} catch(e: Throwable) {
e.printStackTrace()
socket.close()
connected = false
}
}
}
coletz
10/13/2018, 9:20 PMjcechace
10/14/2018, 10:49 AMvoddan
10/15/2018, 9:36 AMfrellan
10/15/2018, 12:07 PMhudsonb
10/16/2018, 1:14 PMThe HttpRequestBuilder.body property can be a subtype of OutgoingContent as well as a String instance:
body = "HELLO WORLD!"
body = TextContent("HELLO WORLD!", ContentType.Text.Plain)
...
Got me excited that setter overrides had been added or something but body
is just defined as Any
. 😭zachtib
10/16/2018, 3:48 PMhmole
10/16/2018, 4:15 PMLempere
10/16/2018, 4:25 PMSergio Casero
10/16/2018, 4:26 PMNo configuration setting found for key 'ktor'
The application.conf is in resources directory, and "run" task configuration is based on it, so... I don't understand anything.
I've also tried to create a new project like https://ktor.io/quickstart/faq.html#cannot-find-application-conf is suggesting, but I'm getting the same issue
Also, If I try to run with "play button on main class" on IntelliJ, IntelliJ says "cannot find main class"russhwolf
10/16/2018, 10:08 PMkotlin-multiplatform
plugin? I see that the fullstack-mpp
sample uses the new plugin, but the client-mpp
sample uses the separate platforms plugins so I don't have an example gradle setup to compare to.franek
10/17/2018, 6:37 AMachilleskal
10/17/2018, 8:10 AMholgerbrandl
10/17/2018, 8:35 AMDias
10/17/2018, 9:43 AMDias
10/17/2018, 9:43 AMholgerbrandl
10/17/2018, 9:45 AMPOST <http://user:password@localhost:8080/snippets>
Content-Type: application/json
WWW-Authenticate: Basic myrealm
{
"snippet": {
"text": "heyho"
}
}
which works, but I was wondering if I could also put the credentials into the request header in some way?Jonas Bark
10/17/2018, 2:20 PM> Task :common:linkDebugFrameworkIos
Undefined symbols for architecture arm64:
"_private_classes_<ktor-client-core-ios>_io.ktor.client.request.DefaultHttpRequest_94", referenced from:
_kfun:com.stihl.app.module.connect.api.Ios2ClientEngine.execute(io.ktor.client.call.HttpClientCall;io.ktor.client.request.HttpRequestData)io.ktor.client.call.HttpEngineCall in combined.o
"_private_functions_<ktor-client-core-ios>_kfun:io.ktor.client.request.DefaultHttpRequest.<get-content>()io.ktor.http.content.OutgoingContent_133", referenced from:
_kfun:com.stihl.app.module.connect.api.Ios2ClientEngine.execute(io.ktor.client.call.HttpClientCall;io.ktor.client.request.HttpRequestData)io.ktor.client.call.HttpEngineCall in combined.o
"_private_functions_<ktor-client-core-ios>_kfun:io.ktor.client.request.DefaultHttpRequest.<get-headers>()io.ktor.http.Headers_134", referenced from:
_kfun:com.stihl.app.module.connect.api.Ios2ClientEngine.execute(io.ktor.client.call.HttpClientCall;io.ktor.client.request.HttpRequestData)io.ktor.client.call.HttpEngineCall in combined.o
"_private_functions_<ktor-client-core-ios>_kfun:io.ktor.client.request.DefaultHttpRequest.<get-method>()io.ktor.http.HttpMethod_131", referenced from:
_kfun:com.stihl.app.module.connect.api.Ios2ClientEngine.execute(io.ktor.client.call.HttpClientCall;io.ktor.client.request.HttpRequestData)io.ktor.client.call.HttpEngineCall in combined.o
"_private_functions_<ktor-client-core-ios>_kfun:io.ktor.client.request.DefaultHttpRequest.<get-url>()io.ktor.http.Url_132", referenced from:
_kfun:com.stihl.app.module.connect.api.Ios2ClientEngine.execute(io.ktor.client.call.HttpClientCall;io.ktor.client.request.HttpRequestData)io.ktor.client.call.HttpEngineCall in combined.o
ld: symbol(s) not found for architecture arm64
I suspect it's because of the DefaultHttpRequest but I have no clue how to work around this. Any idea?Dias
10/17/2018, 3:49 PMrocketraman
10/17/2018, 5:10 PMJsonFeature
how do I deal with two possible response formats e.g. a normal response and an error response?Sergio Casero
10/17/2018, 7:17 PMgaetan
10/18/2018, 10:03 AM* What went wrong:
Could not determine the dependencies of task ':data2viz-client:runDceKotlinJs'.
> Could not resolve all files for configuration ':data2viz-client:kotlinCompilerClasspath'.
> Could not find org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.0-rc-131.
Searched in the following locations:
<https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.0-rc-131/kotlin-compiler-embeddable-1.3.0-rc-131.module>
<https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.0-rc-131/kotlin-compiler-embeddable-1.3.0-rc-131.pom>
Required by:
project :data2viz-client
Is there some modifications on DCE in 1.3?enleur
10/18/2018, 10:42 AMdave08
10/18/2018, 10:43 AMApplicationCall.receiveFile/s()
be added to Ktor? Or is it too application specific?