/[pengfork]/pengfork/include/engine.h
ViewVC logotype

Diff of /pengfork/include/engine.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by chupa, Thu Sep 5 23:09:37 2002 UTC revision 1.2 by chupa, Fri Sep 6 23:03:55 2002 UTC
# Line 24  Line 24 
24  #ifndef __ENGINE_H__  #ifndef __ENGINE_H__
25  #define __ENGINE_H__  #define __ENGINE_H__
26    
27    #include <sys/types.h>
28    
29    #include "buffer.h"
30    
31    /* the timeout in seconds */
32    #define ENGINE_TIMEOUT  5
33    
34    typedef void (*init_fn_t) (buffer_t *, buffer_t *);
35    typedef int (*want_read_fn_t) (buffer_t *, buffer_t *);
36    typedef void (*readfn_fn_t) (buffer_t *, buffer_t *, int);
37    typedef int (*end_fn_t) (buffer_t *, buffer_t *);
38    
39  int engine_init (void);  int engine_init (void);
40  void engine_loop (void);  void engine_loop (void);
41    void engine_stop (void);
42    void engine_register (int fd, int timeout_notify, init_fn_t init,
43                          want_read_fn_t want_read, readfn_fn_t readfn,
44                          end_fn_t end);
45    void engine_unregister (int fd);
46    void engine_set_readers (fd_set * fdset, int *maxfd);
47    void engine_set_writers (fd_set * fdset, int *maxfd);
48    void engine_read (fd_set * fdset);
49    void engine_write (fd_set * fdset);
50    void engine_timeout (int timeouts);
51    
52    
53  #endif /* __ENGINE_H__ */  #endif /* __ENGINE_H__ */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26