ApplicationCall.respondBytes takes a single ByteAr...
# ktor
n
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
Consider to respond with object that inherits
WriteChannelContent
d
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
Thanx. That is it... i was finding only multipart text responses in the docs...