DCL 4.0
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#if __DCL_WINDOWS
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 { Thread::start(); }
35 int join()
36 { return Thread::join(); }
37 bool started() const
38 { return Thread::started(); }
39 unsigned long id() const
40 { return Thread::id(); }
41 const String& name() const
42 { return Thread::name(); }
43
56 virtual bool add(PollAble* _pPollAble, short _events)
57 __DCL_THROWS1(IOException*);
58
64 virtual bool remove(PollAble* _pPollAble);
65
70 void terminate();
71
72protected:
73 virtual int run();
74
75 WSAEVENT __pollInterrupt;;
76};
77#else
79#endif // __DCL_WINDOWS
80
81__DCL_END_NAMESPACE
82
83#endif // __DCL_SOCKET_POLL_THREAD_H__
#define NULL
Definition Config.h:340
#define DCLCAPI
Definition Config.h:100
wchar_t char_t
Definition Config.h:275
#define __DCL_THROWS1(e)
Definition Config.h:167
#define DECLARE_CLASSINFO(class_name)
Definition Object.h:210
__DCL_BEGIN_NAMESPACE typedef PollThread SocketPollThread
virtual int run()