ApplicationCall.respondBytes takes a single ByteArray. Is it possible to do 'vector' write by providing multiple array which should be written. I am trying to avoid buffer copying...
📝 1
✅ 1
e
e5l
08/10/2018, 11:50 AM
Consider to respond with object that inherits
WriteChannelContent
d
Deactivated User
08/10/2018, 11:52 AM
Copy code
call.respond(object : OutgoingContent.WriteChannelContent() {
override val contentType = ContentType.Application.OctetStream
override suspend fun writeTo(channel: ByteWriteChannel) {
channel.writeFully(byteArray1)
channel.writeFully(byteArray2)
}
})
👏 1
n
nbdam
08/10/2018, 12:00 PM
Thanx. That is it... i was finding only multipart text responses in the docs...