Skip to content

Commit

Permalink
20160524
Browse files Browse the repository at this point in the history
  • Loading branch information
liangdc committed May 24, 2016
1 parent 595cfdb commit 846d0e5
Show file tree
Hide file tree
Showing 747 changed files with 73,923 additions and 1,227 deletions.
Binary file added Doc/HP-Socket Class Diagram - v3.5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29,473 changes: 29,473 additions & 0 deletions Doc/HP-Socket Class Diagram - v3.5.uml

Large diffs are not rendered by default.

Binary file added Doc/HP-Socket SSL Class Diagram - v3.5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL_D.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL_D.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL_U.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL_U.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL_UD.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x64/HPSocket-SSL_UD.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket_D.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket_D.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket_U.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket_U.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket_UD.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x64/HPSocket_UD.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL_D.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL_D.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL_U.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL_U.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL_UD.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket/x86/HPSocket-SSL_UD.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket_D.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket_D.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket_U.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket_U.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket_UD.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket/x86/HPSocket_UD.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x64/HPSocket4C-SSL.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x64/HPSocket4C-SSL.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x64/HPSocket4C-SSL_D.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x64/HPSocket4C-SSL_D.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x64/HPSocket4C-SSL_U.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x64/HPSocket4C-SSL_U.lib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C_D.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C_D.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C_U.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C_U.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C_UD.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x64/HPSocket4C_UD.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x86/HPSocket4C-SSL.dll
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x86/HPSocket4C-SSL.lib
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x86/HPSocket4C-SSL_D.dll
Binary file not shown.
Binary file not shown.
Binary file added HP-Socket/Bin/HPSocket4C/x86/HPSocket4C-SSL_U.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C_D.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C_D.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C_U.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C_U.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C_UD.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4C/x86/HPSocket4C_UD.lib
Binary file not shown.
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4CS/x64/HPSocket4C_U.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4CS/x64/HPSocketCS.dll
Binary file not shown.
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4CS/x86/HPSocket4C_U.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4CS/x86/HPSocketCS.dll
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4E/支持库/HPSocket_4C.lib
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4E/支持库/Hp_Socket.fne
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4E/支持库/Hp_Socket_static.lib
Binary file not shown.
5 changes: 4 additions & 1 deletion HP-Socket/Bin/HPSocket4E/支持库/使用方法.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ Hp_Socket_static.lib、HPSocket_4C.lib 放入static_Lib目录

本支持库需要易语言vs2010链接器(链接: http://pan.baidu.com/s/1i3ydamT 密码: baka)

点击链接加入群【怪兽乐园】:http://jq.qq.com/?_wv=1027&k=2Ia8fHv
点击链接加入群【怪兽乐园】:http://jq.qq.com/?_wv=1027&k=2Ia8fHv

3.5.1 相对于其他版本变动
1.删除AddressInfo 数据类型
Binary file modified HP-Socket/Bin/HPSocket4E/模块/HPSocket.ec
Binary file not shown.
Binary file modified HP-Socket/Bin/HPSocket4E/模块/HPSocket4C.ec
Binary file not shown.
98 changes: 98 additions & 0 deletions HP-Socket/Demo/Global/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ void LogOnConnect2(CONNID dwConnID)
LogMsg(msg);
}

void LogOnHandShake2(CONNID dwConnID)
{
CString msg;
msg.Format(_T(" > [ %Iu, %s ]"), dwConnID, EVT_ON_HAND_SHAKE);
LogMsg(msg);
}

void PostOnSend(CONNID dwConnID, const BYTE* pData, int iLength)
{
/*
Expand Down Expand Up @@ -240,6 +247,13 @@ void PostOnAccept2(CONNID dwConnID)
PostInfoMsg(msg);
}

void PostOnHandShake(CONNID dwConnID)
{
info_msg* msg = info_msg::Construct(dwConnID, EVT_ON_HAND_SHAKE, 0, nullptr);

PostInfoMsg(msg);
}

void PostOnPrepareListen(LPCTSTR lpszAddress, USHORT usPort)
{
LPTSTR lpszContent = new TCHAR[100];
Expand Down Expand Up @@ -277,6 +291,13 @@ void PostOnConnect2(CONNID dwConnID, LPCTSTR lpszAddress, USHORT usPort)
PostInfoMsg(msg);
}

void PostOnConnect3(CONNID dwConnID)
{
info_msg* msg = info_msg::Construct(dwConnID, EVT_ON_CONNECT, 0, nullptr);

PostInfoMsg(msg);
}

void PostOnShutdown()
{
info_msg* msg = info_msg::Construct(0, EVT_ON_SHUTDOWN, 0, nullptr);
Expand Down Expand Up @@ -403,3 +424,80 @@ CBufferPtr* GeneratePkgBuffer(const TPkgHeader& header, const TPkgBody& body)

return pBuffer;
}

#ifdef _SSL_SUPPORT

#include "../../../Common/Src/FuncHelper.h"

CString g_c_strCAPemCertFileOrPath;
CString g_c_strPemCertFile;
CString g_c_strPemKeyFile;

CString g_s_strCAPemCertFileOrPath;
CString g_s_strPemCertFile;
CString g_s_strPemKeyFile;

int g_c_iVerifyMode = SSL_VM_PEER;
LPCTSTR g_c_lpszCAPemCertFileOrPath = _T("ssl-cert\\ca.crt");
LPCTSTR g_c_lpszPemCertFile = _T("ssl-cert\\client.cer");
LPCTSTR g_c_lpszPemKeyFile = _T("ssl-cert\\client.key");
LPCTSTR g_c_lpszKeyPasswod = _T("123456");

int g_s_iVerifyMode = SSL_VM_PEER | SSL_VM_FAIL_IF_NO_PEER_CERT;
LPCTSTR g_s_lpszCAPemCertFileOrPath = _T("ssl-cert\\ca.crt");
LPCTSTR g_s_lpszPemCertFile = _T("ssl-cert\\server.cer");
LPCTSTR g_s_lpszPemKeyFile = _T("ssl-cert\\server.key");
LPCTSTR g_s_lpszKeyPasswod = _T("123456");

BOOL InitSSLParams();
BOOL g_SSLParams = InitSSLParams();

BOOL InitSSLParams()
{
::SetCurrentPathToModulePath();

CString strPath;
::GetCurrentDirectory(MAX_PATH, strPath.GetBuffer(MAX_PATH));
strPath.ReleaseBuffer();
strPath += PATH_SEPARATOR_CHAR;

if(g_c_lpszPemCertFile)
{
g_c_strPemCertFile = strPath + g_c_lpszPemCertFile;
g_c_lpszPemCertFile = g_c_strPemCertFile;
}

if(g_c_lpszPemKeyFile)
{
g_c_strPemKeyFile = strPath + g_c_lpszPemKeyFile;
g_c_lpszPemKeyFile = g_c_strPemKeyFile;
}

if(g_c_lpszCAPemCertFileOrPath)
{
g_c_strCAPemCertFileOrPath = strPath + g_c_lpszCAPemCertFileOrPath;
g_c_lpszCAPemCertFileOrPath = g_c_strCAPemCertFileOrPath;
}

if(g_s_lpszPemCertFile)
{
g_s_strPemCertFile = strPath + g_s_lpszPemCertFile;
g_s_lpszPemCertFile = g_s_strPemCertFile;
}

if(g_s_lpszPemKeyFile)
{
g_s_strPemKeyFile = strPath + g_s_lpszPemKeyFile;
g_s_lpszPemKeyFile = g_s_strPemKeyFile;
}

if(g_s_lpszCAPemCertFileOrPath)
{
g_s_strCAPemCertFileOrPath = strPath + g_s_lpszCAPemCertFileOrPath;
g_s_lpszCAPemCertFileOrPath = g_s_strCAPemCertFileOrPath;
}

return TRUE;
}

#endif
24 changes: 24 additions & 0 deletions HP-Socket/Demo/Global/helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define EVT_ON_PREPARE_LISTEN _T("OnPrepareListen")
#define EVT_ON_ACCEPT _T("OnAccept")
#define EVT_ON_CONNECT _T("OnConnect")
#define EVT_ON_HAND_SHAKE _T("OnHandShake")
#define EVT_ON_SHUTDOWN _T("OnShutdown")
#define EVT_ON_END_TEST _T("END TEST")

Expand Down Expand Up @@ -82,6 +83,7 @@ void LogDetect(CONNID dwConnID);
void LogDetectFail(CONNID dwConnID);
void LogOnConnect(CONNID dwConnID, const CString& strAddress, USHORT usPort);
void LogOnConnect2(CONNID dwConnID);
void LogOnHandShake2(CONNID dwConnID);
void LogMsg(const CString& msg);
void PostOnSend(CONNID dwConnID, const BYTE* pData, int iLength);
void PostOnReceive(CONNID dwConnID, const BYTE* pData, int iLength);
Expand All @@ -90,12 +92,34 @@ void PostOnClose(CONNID dwConnID);
void PostOnError(CONNID dwConnID, int enOperation, int iErrorCode);
void PostOnAccept(CONNID dwConnID, LPCTSTR lpszAddress, USHORT usPort, BOOL bPass);
void PostOnAccept2(CONNID dwConnID);
void PostOnHandShake(CONNID dwConnID);
void PostOnPrepareListen(LPCTSTR lpszAddress, USHORT usPort);
void PostOnPrepareConnect(CONNID dwConnID);
void PostOnConnect(CONNID dwConnID, LPCTSTR lpszAddress, USHORT usPort);
void PostOnConnect2(CONNID dwConnID, LPCTSTR lpszAddress, USHORT usPort);
void PostOnConnect3(CONNID dwConnID);
void PostOnShutdown();
void PostServerStatics(const LONGLONG& llTotalSent, const LONGLONG& llTotalReceived);
void PostTimeConsuming(DWORD dwTickCount);
void PostInfoMsg(info_msg* msg);
void LogInfoMsg(info_msg* pInfoMsg);

#ifdef _SSL_SUPPORT

#include "../../Src/SocketInterface-SSL.h"

extern int g_c_iVerifyMode;
extern BOOL g_c_bNeedClientVerification;
extern LPCTSTR g_c_lpszCAPemCertFileOrPath;
extern LPCTSTR g_c_lpszPemCertFile;
extern LPCTSTR g_c_lpszPemKeyFile;
extern LPCTSTR g_c_lpszKeyPasswod;

extern int g_s_iVerifyMode;
extern BOOL g_s_bNeedClientVerification;
extern LPCTSTR g_s_lpszCAPemCertFileOrPath;
extern LPCTSTR g_s_lpszPemCertFile;
extern LPCTSTR g_s_lpszPemKeyFile;
extern LPCTSTR g_s_lpszKeyPasswod;

#endif
Binary file modified HP-Socket/Demo/HttpProxy/HttpProxy.suo
Binary file not shown.
Binary file modified HP-Socket/Demo/HttpProxy/Server/Server.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion HP-Socket/Demo/Other Languages Demos/Authors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* ������ģ�� ���ߣ� ׿Խ��άС��

1��C# Demo ���ߣ� int 2e
2��Delphi Demo ���ߣ� int 2e
2��Delphi Demo ���ߣ� �����д~
3�������� Demo ���ߣ� Yecate��׿Խ��άС��
Loading

0 comments on commit 846d0e5

Please sign in to comment.