readDirect

inline fun Buffer.readDirect(block: (DataView) -> Int): Int
inline fun ChunkBuffer.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 ByteReadPacket.readDirect(size: Int, block: (ByteBuffer) -> Unit)


inline fun Input.readDirect(size: Int, block: (ByteBuffer) -> Unit)

Deprecated

Use read {} instead.

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