enet
enet copied to clipboard
API Documentation
It would be nice if the API documentation could be fleshed out. As it is there is no explanation for the majority of things not explained in the short tutorial.
For example, it seems like a common thing that people end up doing is when a peer connects to a host, the host code will maintain a list of peers somehow by adding the event peer to their own list. Which for the most part is fine.
But I am looking at the API documentation of ENetHost struct and I see that there is a field named 'connectedPeers' with no explanation and a field named 'peers' with the explanation of 'array of peers allocated for this host' so... does the host struct maintain the list of connected peers internally? If so all the people maintaining that list separately could just be using this. But without diving into the code to see what's going on we have no idea what these fields are actually doing so we can't rely on them. (And they may be usable in that way but it would be nice to be able to look at the API docs and know that.)
I'm sure there are other examples. But the point is just that the majority of the docs are the item's name and that is it. So it'd be cool if someone with the knowledge of what all this stuff does could add quick explanations or even examples on how to use them in code.
Thanks!