/[LeafOK_CVS]/innwebd/base.h
ViewVC logotype

Diff of /innwebd/base.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Sat Jul 3 13:56:04 2004 UTC Revision 1.8 by sysadm, Fri Apr 11 17:14:49 2008 UTC
# Line 1  Line 1 
1  /*******************************************************/  /*******************************************************/
2  /*                                                     */  /*                                                     */
3  /*  LeafOK Innd                                        */  /*  LeafOK Innbbsd                                     */
 /*  Copyright (C) LeafOK.com, 2003-2004                */  
4  /*                                                     */  /*                                                     */
5  /*  Programmed by Leaf                                 */  /*  Copyright (C) LeafOK.com, 2003-2008                */
 /*  E-mail:leaf@leafok.com  QQ:6049044                 */  
6  /*                                                     */  /*                                                     */
7  /*  http://bbs.leafok.com                              */  /*  http://www.leafok.com                              */
 /*  http://bbs.leafok.net                              */  
 /*  http://bbs.fenglin.info                            */  
8  /*                                                     */  /*                                                     */
9  /*******************************************************/  /*******************************************************/
10    
# Line 28  public: Line 24  public:
24          int end(void);          int end(void);
25          inline bool IsRunning(void)          inline bool IsRunning(void)
26          {          {
27                  return this->running;                  return (this->running && this->IsThreadActive());
28          }          }
29          inline base* GetParentThread(void)          inline base* GetParentThread(void)
30          {          {
# Line 47  public: Line 43  public:
43                  this->p_ThreadPool = p_ThreadPool;                  this->p_ThreadPool = p_ThreadPool;
44          }          }
45  protected:  protected:
46            ULONG ulMainThreadId;
47          base* p_ParentThread;          base* p_ParentThread;
48          thread_pool* p_ThreadPool;          thread_pool* p_ThreadPool;
49          SOCKET s;          SOCKET s;
# Line 72  protected: Line 69  protected:
69          virtual int s_connect(const char* hostname, unsigned int port) = 0;          virtual int s_connect(const char* hostname, unsigned int port) = 0;
70          virtual int s_close(void) = 0;          virtual int s_close(void) = 0;
71          int s_send(const char* in_str, bool auto_endl = true);          int s_send(const char* in_str, bool auto_endl = true);
72          int s_receive(CString& out_str, const char* end_str="\r\n");          int s_receive(CString& out_str, char end_str[] = "\r");
73          int s_exec(const char* in_str, CString& out_str, const char* end_str="\r\n");          int s_exec(const char* in_str, CString& out_str, char end_str[] = "\r");
74          virtual bool IsShutdown(void);          virtual bool IsShutdown(void);
75          virtual int Shutdown(void);          virtual int Shutdown(void);
76          virtual int Startup(void);          virtual int Startup(void);
77          virtual int w_call() = 0;          virtual int w_call() = 0;
78  private:  private:
         HANDLE hThread;  
79          static DWORD Thread(LPVOID pParam);          static DWORD Thread(LPVOID pParam);
80    public:
81            bool IsThreadActive(void);
82  };  };
83    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1