| 16 |
|
|
| 17 |
#include "afxdb.h" |
#include "afxdb.h" |
| 18 |
#include "winsock2.h" |
#include "winsock2.h" |
| 19 |
|
#include ".\thread_pool.h" |
| 20 |
|
|
| 21 |
class base |
class base |
| 22 |
{ |
{ |
| 26 |
virtual void configure(const char* innd_id, const char* innd_name, const char* innd_server, unsigned long innd_uid, const char* w_address, unsigned int w_port, const char* w_conn_str); |
virtual void configure(const char* innd_id, const char* innd_name, const char* innd_server, unsigned long innd_uid, const char* w_address, unsigned int w_port, const char* w_conn_str); |
| 27 |
int begin(void); |
int begin(void); |
| 28 |
int end(void); |
int end(void); |
| 29 |
bool IsRunning(void); |
inline bool IsRunning(void) |
| 30 |
|
{ |
| 31 |
|
return this->running; |
| 32 |
|
} |
| 33 |
|
inline base* GetParentThread(void) |
| 34 |
|
{ |
| 35 |
|
return this->p_ParentThread; |
| 36 |
|
} |
| 37 |
|
inline void SetParentThread(base* p_ParentThread) |
| 38 |
|
{ |
| 39 |
|
this->p_ParentThread = p_ParentThread; |
| 40 |
|
} |
| 41 |
|
inline thread_pool* GetThreadPool(void) |
| 42 |
|
{ |
| 43 |
|
return this->p_ThreadPool; |
| 44 |
|
} |
| 45 |
|
inline void SetThreadPool(thread_pool* p_ThreadPool) |
| 46 |
|
{ |
| 47 |
|
this->p_ThreadPool = p_ThreadPool; |
| 48 |
|
} |
| 49 |
protected: |
protected: |
| 50 |
|
base* p_ParentThread; |
| 51 |
|
thread_pool* p_ThreadPool; |
| 52 |
SOCKET s; |
SOCKET s; |
| 53 |
SOCKADDR sockaddr; |
SOCKADDR sockaddr; |
| 54 |
CDatabase Db; |
CDatabase Db; |