SoftwareGuy / Ignorance

Ignorance utilizes the power of ENet to provide a reliable UDP networking transport for Mirror Networking.
Other
248 stars 31 forks source link

ENet polling in a job #36

Closed martindevans closed 2 years ago

martindevans commented 5 years ago

This is just a very hacky example of how to poll ENet in a job, by no means is this an actual pull request which should be merged!

The main event loop:

Actual processing of the ENet events isn't moved into a background thread, obviously you'd want to move as much of that into a job as possible in practice.

There's some other unrelated stuff, mostly just spring cleaning as I was looking around the codebase. better namespacing, moving ChannelType out to a separate file, ToENetPacketFlag extension etc. You can pretty much ignore all that.