<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi all,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><div class="gmail_default">I'd like to implement a single-threaded polling schema, calling enet_host_service() every game frame as suggested in the tutorial.</div><div class="gmail_default"><br></div><div class="gmail_default">Now, enet_host_service() returns a single event (if any), </div><div class="gmail_default">so what is the correct way to handle the case in which I have received multiple events between 2 consecutive frames?</div><div class="gmail_default"><br></div><div class="gmail_default">I was thinking to call every frame something like:</div><div class="gmail_default">while (enet_host_service (client, & event, 0U) > 0)<br></div><div class="gmail_default">{ ... }</div><div class="gmail_default"><br></div><div class="gmail_default">but I wonder whether this might stall the application. </div><div class="gmail_default">Or I can make the assumption that enet_host_service() is fast enough to return with timeout 0 that it's impossible to have it stalling in the loop?</div><div class="gmail_default"><br></div><div class="gmail_default">Thank you,</div><div class="gmail_default">Ricky</div></div></div>