Packeteer
This page covers the API Reference for the ‘Packeteer’ instance.
create()
Section titled “create()”Creates a Packeteer network instance from a schema.
Signature
Packeteer.create<Server, Client>(schema: NetworkSchema<Server, Client>): Packeteer<Server, Client>Paramaters
- schema - The network schema containing Server and Client packets
Returns Returns a PacketeerInstance containing:
- Network.Server
- Network.Client
initializeServer()
Section titled “initializeServer()”Loads all network schemas inside a folder.
Signature
Packeteer.initializeServer(networkingFolder: Folder)Paramaters
- schema - Folder containing schema ModuleScripts
event()
Section titled “event()”Creates a reliable Packet Event.
Signature
Packeteer.event<T>(): PacketEvent<T>Generic Parameters
- T - Data sent through the event
Returns Returns a PacketEvent
packetFunction()
Section titled “packetFunction()”Creates a promise-based Packet Function.
Signature
Packeteer.packetFunction<T, R>(): PacketFunction<T, R>Generic Parameters
- T - Arguments sent to the function
- R - Returned value
Returns Returns a PacketFunction
unreliable()
Section titled “unreliable()”Creates an unreliable Packet Event.
Signature
Packeteer.unreliable<T>(): UnreliablePacketEvent<T>Generic Parameters
- T - Data sent through the event
Returns Returns a UnreliablePacketEvent
