forked from openrs2/openrs2
This is possible now it is no longer a subclass of a sealed class. Signed-off-by: Graham <gpe@openrs2.org>bzip2
parent
b6e91b756e
commit
7691f63d29
@ -1,43 +1,11 @@ |
|||||||
package org.openrs2.protocol.js5 |
package org.openrs2.protocol.js5 |
||||||
|
|
||||||
import io.netty.buffer.ByteBuf |
import io.netty.buffer.ByteBuf |
||||||
import io.netty.util.ReferenceCounted |
import io.netty.buffer.DefaultByteBufHolder |
||||||
|
|
||||||
public data class Js5Response( |
public data class Js5Response( |
||||||
public val prefetch: Boolean, |
public val prefetch: Boolean, |
||||||
public val archive: Int, |
public val archive: Int, |
||||||
public val group: Int, |
public val group: Int, |
||||||
public val data: ByteBuf |
public val data: ByteBuf |
||||||
) : ReferenceCounted { |
) : DefaultByteBufHolder(data) |
||||||
override fun refCnt(): Int { |
|
||||||
return data.refCnt() |
|
||||||
} |
|
||||||
|
|
||||||
override fun retain(): Js5Response { |
|
||||||
data.retain() |
|
||||||
return this |
|
||||||
} |
|
||||||
|
|
||||||
override fun retain(increment: Int): Js5Response { |
|
||||||
data.retain(increment) |
|
||||||
return this |
|
||||||
} |
|
||||||
|
|
||||||
override fun touch(): Js5Response { |
|
||||||
data.touch() |
|
||||||
return this |
|
||||||
} |
|
||||||
|
|
||||||
override fun touch(hint: Any?): Js5Response { |
|
||||||
data.touch(hint) |
|
||||||
return this |
|
||||||
} |
|
||||||
|
|
||||||
override fun release(): Boolean { |
|
||||||
return data.release() |
|
||||||
} |
|
||||||
|
|
||||||
override fun release(decrement: Int): Boolean { |
|
||||||
return data.release(decrement) |
|
||||||
} |
|
||||||
} |
|
||||||
|
Loading…
Reference in new issue