[ENet-discuss] ENet handling of EAGAIN and EINTR

James Bellinger james at illusorystudios.com
Tue Apr 23 03:56:01 PDT 2013


Howdy Dennis

ENet already uses -1 to indicate error, and this -2 just means 'no 
error, but I need you to recompute the timeout'.

I'm not trying to relay the actual error information -- ENet currently 
abstracts that away Windows vs. Unix. Plus it'd mean current errors 
would be "EPERM" :)

James

On 4/23/2013 4:21 AM, Dennis Schridde wrote:
> Hi James!
>
> Am Dienstag, 23. April 2013, 00:25:15 schrieb James Bellinger:
>> enet_socket_wait is sent a timeout. If I retry poll/select, the timeout
>> will be wrong. So, my thought is, introduce a new return value -2 on
>> enet_socket_wait to indicate 'error, but retry'.
> Maybe return -EAGAIN? That is how I try to do it in my code - reuse Unix error
> codes where applicable.
>
> --Dennis



More information about the ENet-discuss mailing list