Rudiments
listener.h
1 // Copyright (c) 2002 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_LISTENER_H
5 #define RUDIMENTS_LISTENER_H
6 
7 #include <rudiments/private/listenerincludes.h>
8 
9 #ifdef RUDIMENTS_NAMESPACE
10 namespace rudiments {
11 #endif
12 
15 
16 class listenerprivate;
17 
20 class RUDIMENTS_DLLSPEC listener {
21  public:
23  listener();
24 
26  virtual ~listener();
27 
30  void addFileDescriptor(filedescriptor *fd);
31 
48  int32_t waitForNonBlockingRead(long sec, long usec);
49 
67  int32_t waitForNonBlockingWrite(long sec, long usec);
68 
74  listenerlist *getReadyList();
75 
77  void removeFileDescriptor(filedescriptor *fd);
78 
80  void removeAllFileDescriptors();
81 
82 
85  void retryInterruptedWaits();
86 
90  void dontRetryInterruptedWaits();
91 
92  #include <rudiments/private/listener.h>
93 };
94 
95 #ifdef RUDIMENTS_NAMESPACE
96 }
97 #endif
98 
99 #endif