[ENet-discuss] Multiple events for single frame

2016-09-21 Thread Riccardo Corsi
Hi all, I'd like to implement a single-threaded polling schema, calling enet_host_service() every game frame as suggested in the tutorial. Now, enet_host_service() returns a single event (if any), so what is the correct way to handle the case in which I have received multiple events between 2 con

Re: [ENet-discuss] Multiple events for single frame

2016-09-21 Thread Riccardo Corsi
Long Cheng 写道: > > you should handle multiple events in one frame like this: > > int er = enet_host_service(host, &event, timeout); > while (er > 0) > { > // process event > er = enet_host_check_events(enet_server, &event); > } &