+ // the FD sets indices
+ enum
+ {
+ Read,
+ Write,
+ Except,
+ Max
+ };
+
+ // the sets used with select()
+ fd_set m_fds[Max];
+
+ // the wxFDIO_XXX flags, functions and names (used for debug messages only)
+ // corresponding to the FD sets above
+ static int ms_flags[Max];
+ static const char *ms_names[Max];
+ static Callback ms_handlers[Max];
+};
+
+class WXDLLIMPEXP_BASE wxSelectDispatcher : public wxMappedFDIODispatcher
+{
+public:
+ // default ctor
+ wxSelectDispatcher() { m_maxFD = -1; }
+
+ // implement pure virtual methods of the base class
+ virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL);
+ virtual bool ModifyFD(int fd, wxFDIOHandler *handler, int flags = wxFDIO_ALL);
+ virtual bool UnregisterFD(int fd);
+ virtual bool HasPending() const;
+ virtual int Dispatch(int timeout = TIMEOUT_INFINITE);