public final class SourceRconPacketFactory extends Object
SourceRconPacket
instancesModifier and Type | Method and Description |
---|---|
static SourceRconPacket |
createAuth(int id,
byte[] password)
Create a new Authentication Request Packet
|
static SourceRconPacket |
createAuthResponse(int id)
Create an authentication response packet
|
static SourceRconPacket |
createCommand(int id,
String command)
Create a command request packet
|
static SourceRconPacket |
createPacket(int id,
int type,
io.netty.buffer.ByteBuf payload)
createPacket.
|
static SourceRconPacket |
createPacket(int size,
int id,
int type,
int terminator,
io.netty.buffer.ByteBuf payload)
createPacket.
|
static SourceRconPacket |
createResponseValue(int id,
io.netty.buffer.ByteBuf payload)
Create a response value packet
|
static SourceRconPacket |
createResponseValue(int id,
String response)
Create a response value packet
|
static SourceRconPacket |
createTerminator()
Create a new terminator packet.
|
public static SourceRconPacket createAuth(int id, byte[] password)
id
- The request id to be associated with this requestpassword
- The rcon password to use to authenticate with the serverSourceRconPacket
public static SourceRconPacket createPacket(int id, int type, io.netty.buffer.ByteBuf payload)
createPacket.
id
- a inttype
- a intpayload
- a ByteBuf
objectSourceRconPacket
objectpublic static SourceRconPacket createPacket(int size, int id, int type, int terminator, io.netty.buffer.ByteBuf payload)
createPacket.
size
- a intid
- a inttype
- a intterminator
- a intpayload
- a ByteBuf
objectSourceRconPacket
objectpublic static SourceRconPacket createAuthResponse(int id)
id
- A positive integer indicating a successful authentication or -1 if authentication failedSourceRconPacket
public static SourceRconPacket createCommand(int id, String command)
id
- A unique positive integercommand
- The command to be sent to the serverSourceRconPacket
public static SourceRconPacket createTerminator()
SourceRconPacket
public static SourceRconPacket createResponseValue(int id, String response)
id
- A positive or negative valueresponse
- The message payload of the response in the form of a String
SourceRconPacket
public static SourceRconPacket createResponseValue(int id, io.netty.buffer.ByteBuf payload)
id
- A positive or negative valuepayload
- The message payload of the responseSourceRconPacket
Copyright © 2016–2024. All rights reserved.