On Tue, Jan 05, 2010 at 08:59:10AM -0800, [email protected] wrote:
> > Are you sure you keep invoking etp_poll until done_poll_cb has been
> > called?
> 
> No - I guess I'm doing it wrong: I'm using ev_async and calling
> ev_async_send() on each want_poll call. The ev_async callback simply
> calls eio_poll(). done_poll_cb is ignored in my app.

Indeed, that's the problem, the protocol is stateful.

An easy way to implement this is to start an idle watcher in your async
cb, and stopping it either when the done_cb is called or poll_cb returns 0
--- or restarting your async watcher when poll_cb returns -1.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to