PacketDeserializer

class PacketDeserializer : JsonDeserializer<AxochatPacket>

Packet Deserializer

Allows deserializing packets from json to class

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext?): AxochatPacket?

Gson invokes this call-back method during deserialization when it encounters a field of the specified type.

Link copied to clipboard
inline fun <T : AxochatPacket> register(name: String)
Link copied to clipboard
fun registerPacket(packetName: String, packetClass: Class<out AxochatPacket>)

Register packet