Connects a callback to the OnPacketReceive signal table and returns a RakNetSignalConnection. The callback receives a RakNetPacket while the packet is valid.
Connects a callback to the OnPacketReceive signal table and returns a RakNetSignalConnection. The callback receives a RakNetPacket while the packet is valid.
Use the signal-style API to observe incoming packets and disconnect the returned connection.
if not RakNet.is_enabled then returnendlocal connection = RakNet.OnPacketReceive:Connect(function(packet) print(packet.ID, packet.Size)end)task.wait(1)connection:Disconnect()
⌘I
Assistant
Responses are generated using AI and may contain mistakes.