DCL 3.7.4
Loading...
Searching...
No Matches
SocketPollThread.h
Go to the documentation of this file.
1#ifndef __DCL_SOCKET_POLL_THREAD_H__
2#define __DCL_SOCKET_POLL_THREAD_H__ 20110224
3
4#ifndef __DCL_POLL_THREAD_H__
5#include <dcl/PollThread.h>
6#endif
7
8__DCL_BEGIN_NAMESPACE
9
10#ifdef __WINNT__
11class Socket;
26class DCLCAPI SocketPollThread : protected PollThread
27{
29public:
30 SocketPollThread(const char_t* _name = NULL);
31 virtual ~SocketPollThread();
32
33 void start() __DCL_THROWS1(SysError*)
34 {
35 Thread::start();
36 }
37
38 int join()
39 {
40 return Thread::join();
41 }
42
43 bool started() const
44 {
45 return Thread::started();
46 }
47
48 thread_t thread() const
49 {
50 return Thread::thread();
51 }
52
53 const String& name() const
54 {
55 return Thread::name();
56 }
57
70 virtual bool add(PollAble* _pPollAble, short _events)
71 __DCL_THROWS1(IOException*);
72
78 virtual bool remove(PollAble* _pPollAble);
79
84 void terminate();
85
86protected:
87 virtual int run();
88
89 WSAEVENT __pollInterrupt;;
90};
91#else
93#endif // __WINNT__
94
95__DCL_END_NAMESPACE
96
97#endif // __DCL_SOCKET_POLL_THREAD_H__
#define NULL
Definition Config.h:312
#define DCLCAPI
Definition Config.h:95
wchar_t char_t
Definition Config.h:247
#define __DCL_THROWS1(e)
Definition Config.h:152
#define DECLARE_CLASSINFO(class_name)
Definition Object.h:227
pthread_t thread_t
Definition Object.h:27
__DCL_BEGIN_NAMESPACE typedef PollThread SocketPollThread
virtual int run()