Is it even possible to read ASCII data from ktor raw sockets?
otakusenpai
10/04/2018, 2:48 AM
I'm having some problem with this code I implemented:
Copy code
var data: String? = null
var byteBuffer = ByteBuffer.wrap(ByteArray(512))
val bb2String = { data = String(byteBuffer.array(), "ASCII") } }
input.read { byteBuffer -> bb2String }
My knowledge of lambdas isn't too great so a lil help could be appreciated.
otakusenpai
10/04/2018, 3:04 AM
The Raw Sockets page shows that there is readASCIILine() function for ByteReadChannel.
But IntelliJ doesnt show any hints for that function in it.
Please help this is confusing me