toggle menu
openrs2
jvm
switch theme
search in API
openrs2
/
org.openrs2.protocol
/
PacketCodec
Packet
Codec
abstract
class
PacketCodec
<
T
:
Packet
>
(
val
type
:
Class
<
T
>
,
val
opcode
:
Int
)
Inheritors
FixedPacketCodec
VariableBytePacketCodec
VariableShortPacketCodec
NameSuggestionsCodec
Members
Constructors
Packet
Codec
Link copied to clipboard
constructor
(
type
:
Class
<
T
>
,
opcode
:
Int
)
Properties
opcode
Link copied to clipboard
val
opcode
:
Int
type
Link copied to clipboard
val
type
:
Class
<
T
>
Functions
allocate
Buffer
Link copied to clipboard
open
fun
allocateBuffer
(
alloc
:
ByteBufAllocator
,
input
:
T
,
preferDirect
:
Boolean
)
:
ByteBuf
decode
Link copied to clipboard
abstract
fun
decode
(
input
:
ByteBuf
,
cipher
:
StreamCipher
)
:
T
encode
Link copied to clipboard
abstract
fun
encode
(
input
:
T
,
output
:
ByteBuf
,
cipher
:
StreamCipher
)
is
Length
Readable
Link copied to clipboard
abstract
fun
isLengthReadable
(
input
:
ByteBuf
)
:
Boolean
read
Length
Link copied to clipboard
abstract
fun
readLength
(
input
:
ByteBuf
)
:
Int
set
Length
Link copied to clipboard
abstract
fun
setLength
(
output
:
ByteBuf
,
index
:
Int
,
written
:
Int
)
write
Length
Placeholder
Link copied to clipboard
abstract
fun
writeLengthPlaceholder
(
output
:
ByteBuf
)