demux_kqueue_demuxer.hpp

00001 #line 3 "./lpsrc/flx_kqueue_demux.ipk"
00002 #ifndef __FLX_DEMUX_KQUEUE_DEMUXER_H__
00003 #define __FLX_DEMUX_KQUEUE_DEMUXER_H__
00004 
00005 #include "demux_posix_demuxer.hpp"
00006 
00007 namespace flx { namespace demux {
00008 
00009 // ********************************************************
00010 /// kqueue demuxer for osx'n'BSD and at least 1 linux
00011 // ********************************************************
00012 class DEMUX_EXTERN kqueue_demuxer : public posix_demuxer {
00013   int   kq;
00014 protected:
00015   // this could just be passed the socket_wakeup, if it stored
00016   // the flags. Those flags are also set, though, which would
00017   // create a race condition. In and out flags?
00018 
00019   int add_kqueue_filter(socket_wakeup* sv, short filter);
00020   int remove_kqueue_filter(int s, short filter);
00021 
00022   int remove_socket_wakeup(int s, int flags);
00023   void get_evts(bool poll);
00024 public:
00025   kqueue_demuxer();
00026   virtual ~kqueue_demuxer();
00027 
00028   virtual int add_socket_wakeup(socket_wakeup* sv, int flags);
00029 };
00030 
00031 }} // namespace demux, flx
00032 #endif
00033 

Generated on Mon Dec 24 04:04:21 2007 for Felix by  doxygen 1.5.4