lsalzman/enet — pull request #16 by JamesB7 (2013-04-23 11:51:05+00:00)
Title: Fix ENet signal handling on Unix -- encountered on Mono

Not handling these is a big problem for ENet with Mono.
Mono uses signals for its garbage collector, so EINTR happens all the time.
Right now, enet_host_service fails around the time Mono invokes its GC.

The only API change is the addition of -2 error code on enet_socket_wait.
This means 'recompute the timeout and retry'. It's unavoidable for correctness's sake.
Luckily ENet uses a < 0 convention for errors.

With this patch, I no longer receive spurious -1 failures on enet_host_service.

Have a good day :)

James