Skip to content

AlexanderLindholt/PacketPlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 

Repository files navigation

Packet+

An improved version of the Packet networking library.



✨ It’s just better!

This modified version of Packet offers simplified packet definitions and packet safety (early packets are still received). Additionally, it brings minor improvements regarding error messages and optimization.


🛠️ Setup and use it!

First and foremost, learn the original Packet library.


Then, for Packet+, you need to setup a signal library.
Signal+ is recommended because it’s the best.
Make sure to tag the module Signal.


The API is mostly identical to the original library, but there is a key difference, seen below:

❌ Packet:

Use a shared module:

local Packet = require(path.to.Packet)

return {
	MyPacket = Packet("MyPacket", Packet.String),
	MyCoolPacket = Packet("MyCoolPacket", Packet.Number)
}

Or put definitions in every script that uses the packets:

local Packet = require(path.to.Packet)

local myPacket = Packet("MyPacket", Packet.String)
local myCoolPacket = Packet("MyCoolPacket", Packet.Number)

✅ Packet+:

Use a shared module:

local Packet = require(path.to.Packet)

return {
	MyPacket = Packet(Packet.String),
	MyCoolPacket = Packet(Packet.Number)
}

Packet+ removes the name parameter, requiring packets to be defined in a shared module. The packet name is inferred from the table key, reducing repetition and keeping definitions centralized and efficient.

About

An improved version of the Packet networking library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages