Is there currently a way to stop listening to packets similar to the Connection:Disconnect()
method?
Hey @ffrostfall , it looks like the ByteNet Documentation is missing some information that would be useful to have. Also, the latest Github .rbxm release is 5+ months out of date.
For one, the docs feel incomplete. They donât contain standard sections for each custom type, like Packet or Namespace. Also, there isnât any explanation of how the library handles the creation of these types on the server, then replicates them to the client after the client accesses the library. Itâs obvious thatâs what happens after poking around in the code, but the docs should also specify that.
Some other issues I noticed:
-
In the âdefinePacketâ section, under the âSendingâ heading:
Docs are missing server send method âsendToListâ. It only shows 3 send methods for the server, but in the packetâs code it shows âsendToListâ as a 4th method for the server. -
The docs arenât very clear on Namespaces.
The only mention seen is in the âdefinePacketâ section, where you say they are needed, but no more info is given. In the code for namespace definition itâs clear that theyâre just encapsulators for packets, but it would nice for the Docs to have a Section about Namespaces, what they are for, why you need them, etc. In that section, an example of using multiple namespaces, each with their own packets (which can have the same name!), would go a long way. -
Packet configuration.
Right now only Reliability types are able to be configured, but there is no code example of how to do this using the API. Again, digging through the code reveals that you need to include âreliabilityTypeâ in the property table passed to the definePacket() function (this is hinted at in the docs). This is could be a lot clearer from the perspective of a user reading the docs for the first time if the docs included a code example. -
Some examples are unclear:
a) âdefinePacketâ section, in the first example script âpackets.luauâ, where you set up a Namespace and Packet, the packet is named âprintSomethingâ. Later in the section in the code examples, it looks like youâre using the packet defined earlier in packets.luau, but confusingly the packet is now called âmyPacketâ.
b) âdefinePacketâ section example again,
A final issue unrelated to the documentation:
The latest official release on Github is like 5 months out of date. It was last update March 10th, in which time there have been a ton of updates to the source files and a bunch of forks fixing small problems. For people who donât use NPM or wally, this is rough! Thanks in advance for updating that!
Thanks for making this awesome library!