On Fri, Nov 23, 2012 at 06:17:47PM -0500, Dave Abrahams wrote:
> Well, that was a dismal failure.  Any further hints you'd like to give
> about what "simple timer support" means,
>
the main loop (event_wait(), bottom of src/util.c) needs to handle
timers as well. use a dynamic array (managed like the fdparms), keep it
sorted (by expiration time) and hook that into the poll()/select()
timeout. API:
  int add_timer( int secs, void (*cb)( void *aux ), void *aux );
  void del_timer( int id );
  // maybe: void set_timer( int id, int secs );
implementation:
static struct {
  void (*cb)( void *aux );
  void *aux;
  time_t timeout;
  int id;
} *timerparms;
static ntimers, rtimers;

> and how I might use connection objects (conn_t?)  to "hook that up?"
> 
timeouts need to be adjusted more or less when conf_fd() is called and
callbacks are invoked.
conn_t would need to keep the id(s).
upon timeout, an error message would be printed and the bad_callback()
invoked.

the connect timeout and the data timeout should be probably
configurable, possibly independently.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to