/[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.6 by sysadm, Sat Aug 28 15:38:42 2004 UTC
# Line 1  Line 1 
1  /*******************************************************/  /*******************************************************/
2  /*                                                     */  /*                                                     */
3  /*  LeafOK Innd                                        */  /*  LeafOK Innbbsd                                     */
4  /*  Copyright (C) LeafOK.com, 2003-2004                */  /*  Copyright (C) LeafOK.com, 2003-2004                */
5  /*                                                     */  /*                                                     */
6  /*  Programmed by Leaf                                 */  /*  Programmed by Leaf                                 */
7  /*  E-mail:leaf@leafok.com  QQ:6049044                 */  /*  E-mail:leaflet@leafok.com  QQ:6049044              */
8  /*                                                     */  /*                                                     */
9  /*  http://bbs.leafok.com                              */  /*  http://bbs.leafok.com                              */
10  /*  http://bbs.leafok.net                              */  /*  http://bbs.leafok.net                              */
# Line 28  public: Line 28  public:
28          int end(void);          int end(void);
29          inline bool IsRunning(void)          inline bool IsRunning(void)
30          {          {
31                  return this->running;                  return (this->running && this->IsThreadActive());
32          }          }
33          inline base* GetParentThread(void)          inline base* GetParentThread(void)
34          {          {
# Line 47  public: Line 47  public:
47                  this->p_ThreadPool = p_ThreadPool;                  this->p_ThreadPool = p_ThreadPool;
48          }          }
49  protected:  protected:
50            ULONG ulMainThreadId;
51          base* p_ParentThread;          base* p_ParentThread;
52          thread_pool* p_ThreadPool;          thread_pool* p_ThreadPool;
53          SOCKET s;          SOCKET s;
# Line 72  protected: Line 73  protected:
73          virtual int s_connect(const char* hostname, unsigned int port) = 0;          virtual int s_connect(const char* hostname, unsigned int port) = 0;
74          virtual int s_close(void) = 0;          virtual int s_close(void) = 0;
75          int s_send(const char* in_str, bool auto_endl = true);          int s_send(const char* in_str, bool auto_endl = true);
76          int s_receive(CString& out_str, const char* end_str="\r\n");          int s_receive(CString& out_str, char end_str[] = "\r");
77          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");
78          virtual bool IsShutdown(void);          virtual bool IsShutdown(void);
79          virtual int Shutdown(void);          virtual int Shutdown(void);
80          virtual int Startup(void);          virtual int Startup(void);
81          virtual int w_call() = 0;          virtual int w_call() = 0;
82  private:  private:
         HANDLE hThread;  
83          static DWORD Thread(LPVOID pParam);          static DWORD Thread(LPVOID pParam);
84    public:
85            bool IsThreadActive(void);
86  };  };
87    


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

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