LeviLamina
Loading...
Searching...
No Matches
ll::network::PacketRegistrar Class Reference

Public Types

using PacketFactory = std::function<std::unique_ptr<Packet>()>
using PacketHandler = optional_ref<IPacketHandler>

Public Member Functions

LLAPI bool registerPacket (std::string_view name, PacketRuntimeId id, PacketFactory factory)
LLAPI bool registerPacket (std::string_view name, PacketRuntimeId id, PacketFactory factory, PacketHandler handler)
LLAPI bool registerHandler (std::string_view name, PacketRuntimeId id, PacketHandler handler)
LLNDAPI std::unique_ptr< PacketcreatePacket (PacketRuntimeId runtimeId)
LLNDAPI PacketHandler getHandler (PacketRuntimeId runtimeId)

Static Public Member Functions

static LLNDAPI PacketRegistrar & getInstance ()

The documentation for this class was generated from the following file: