Dahrkael/rENet — pull request #2 by jvranish (2012-10-07 03:06:06+00:00)
Title: Fixed several major bugs and added threading support

This pull request fixes several bugs (segfaults) and adds threading support.

Fixed Bugs:
* Multiple instances of Connection would interfere with each other causing segfaults
* Multiple instances of Server would interfere with each other causing segfaults
* Segfault if disconnect is called from a callback that was called from within update
* Update will never return if new packets continue to arrive less than timeout appart
* Because the GIL was never released, calls to enet_host_service would hold up all of ruby (even other threads) until the timeout expired.
* The packet/byte totals would overflow (unnecessarily) at ~2GB

Existing, known, but unfixed bug:
* if you've received a lot of packets since the last update and you do a disconnect you could be delayed by _timeout_ * _num packets_ before disconnect is forced.

Things to note:
* The threading support makes the library dependent on ruby 1.9 or greater. Let me know if this is a problem and we can talk about possible alternatives.