toggle menu
openrs2
jvm
switch theme
search in API
openrs2
/
org.openrs2.protocol
/
VariableShortPacketCodec
Variable
Short
Packet
Codec
abstract
class
VariableShortPacketCodec
<
T
:
Packet
>
(
type
:
Class
<
T
>
,
opcode
:
Int
)
:
PacketCodec
<
T
>
Inheritors
CreateAccountCodec
GameLoginCodec
GameReconnectCodec
WorldListResponseCodec
Members
Constructors
Variable
Short
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
override
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
)
get
Length
Link copied to clipboard
open
fun
getLength
(
input
:
T
)
:
Int
is
Length
Readable
Link copied to clipboard
open
override
fun
isLengthReadable
(
input
:
ByteBuf
)
:
Boolean
read
Length
Link copied to clipboard
open
override
fun
readLength
(
input
:
ByteBuf
)
:
Int
set
Length
Link copied to clipboard
open
override
fun
setLength
(
output
:
ByteBuf
,
index
:
Int
,
written
:
Int
)
write
Length
Placeholder
Link copied to clipboard
open
override
fun
writeLengthPlaceholder
(
output
:
ByteBuf
)