| 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 */ |
| 16 |
#include ".\base.h" |
#include ".\base.h" |
| 17 |
#include "afxtempl.h" |
#include "afxtempl.h" |
| 18 |
|
|
| 19 |
#define MAX_THREAD 256 |
#define MAX_CLIENT 256 |
| 20 |
|
|
| 21 |
class base_passive : |
class base_passive : |
| 22 |
public base |
public base |
| 23 |
{ |
{ |
| 24 |
public: |
public: |
| 25 |
static UINT uThreadCount; |
// static UINT uThreadCount; |
| 26 |
struct Access_STRUCT |
struct Access_STRUCT |
| 27 |
{ |
{ |
| 28 |
char ip[50]; |
char ip[50]; |
| 35 |
~base_passive(void); |
~base_passive(void); |
| 36 |
virtual int work(); |
virtual int work(); |
| 37 |
protected: |
protected: |
|
base_passive* p_ParentThread; |
|
| 38 |
CArray<Access_STRUCT*,Access_STRUCT*> access_array; |
CArray<Access_STRUCT*,Access_STRUCT*> access_array; |
| 39 |
int s_connect(const char* hostaddr, unsigned int port); |
int s_connect(const char* hostaddr, unsigned int port); |
| 40 |
int s_close(void); |
int s_close(void); |