Implement SOCKS proxy feature
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// <20><><EFBFBD>ܼ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㺯<EFBFBD><E3BAAF><EFBFBD>ĺ<EFBFBD>ʱ
|
||||
class auto_tick
|
||||
@@ -100,6 +101,10 @@ public:
|
||||
#define SAFE_DELETE_ARRAY(p) if(NULL !=(p)){ delete[] (p);(p) = NULL;}
|
||||
#endif
|
||||
|
||||
#ifndef SAFE_DELETE_AR
|
||||
#define SAFE_DELETE_AR(p) if(NULL !=(p)){ delete[] (p);(p) = NULL;}
|
||||
#endif
|
||||
|
||||
class CLock
|
||||
{
|
||||
private:
|
||||
@@ -124,3 +129,18 @@ public:
|
||||
EnterCriticalSection(&m_cs);
|
||||
}
|
||||
};
|
||||
|
||||
class CAutoLock
|
||||
{
|
||||
private:
|
||||
CRITICAL_SECTION &m_cs;
|
||||
public:
|
||||
CAutoLock(CRITICAL_SECTION& cs) : m_cs(cs)
|
||||
{
|
||||
EnterCriticalSection(&m_cs);
|
||||
}
|
||||
~CAutoLock()
|
||||
{
|
||||
LeaveCriticalSection(&m_cs);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user