readDirect

inline fun Buffer.readDirect(block: (DataView) -> Int): Int
inline fun <Error class: unknown class>.readDirect(block: (ByteBuffer) -> Unit): Int

Apply block function on a ByteBuffer of readable bytes. The block function should return number of consumed bytes.

Return

number of bytes consumed


inline fun Buffer.readDirect(block: (ByteBuffer) -> Unit): Int
inline fun <Error class: unknown class>.readDirect(size: Int, block: (ByteBuffer) -> Unit)


inline fun <Error class: unknown class>.readDirect(size: Int, block: (ByteBuffer) -> Unit)

Deprecated

Use read {} instead.

inline fun Buffer.readDirect(block: (CPointer<ByteVar>) -> Int): Int
inline fun Buffer.readDirect(block: (ByteArray) -> Int): Int