强大的TcpServer压力测试工具及源码(附突破连接限制的方法和工具)

上传者: zhousiwei | 上传时间: 2025-11-13 17:20:09 | 文件大小: 1.3MB | 文件类型: RAR
/******************************************************************************** * * * G-TcpClient:基于完成端口的Tcp客户端通讯模块(IOCP TcpClient) * * * * Copyright © 2009-2010 GuestCode 代码客(卢益贵) * * 版权所有 侵权必究 * * * * QQ:48092788 E-Mail:48092788@qq.com 源码博客:http://blog.csdn.net/guestcode * * * * GSN:34674B4D-1F63-11D3-B64C-11C04F79498E * * * ********************************************************************************/ #pragma once extern "C" { //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 类型定义 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #ifndef _GTYPE #define _GTYPE typedef unsigned char* PGBUF; typedef void(__stdcall *PGFN_ON_CONNECTED)(unsigned int unPerHandle, unsigned char* pBuf, unsigned int unLen); typedef void(__stdcall *PGFN_ON_RECEIVED)(unsigned int unPerHandle, unsigned char* pBuf, unsigned int unLen); typedef void(__stdcall *PGFN_ON_SENDED)(unsigned int unPerHandle, unsigned int unSendID, unsigned int unLen); typedef void(__stdcall *PGFN_ON_DISCONNECTED)(unsigned int unPerHandle, unsigned int unFlag); typedef void(__stdcall *PGFN_ON_THREAD)(unsigned int unThreadContext, unsigned int unThreadHandle, unsigned int unThreadID, BOOL bIsBegin, unsigned int unFlag); /* typedef struct _CONNECTION { unsigned int unPerHandle; }CONNECTION, *PCONNECTION; typedef void(__stdcall *PGFN_ON_CONNECTED)(unsigned int unPerHandle, unsigned char* pBuf, unsigned int unLen); typedef void(__stdcall *PGFN_ON_RECEIVED)(PCONNECTION pConnection, unsigned char* pBuf, unsigned int unLen); typedef void(__stdcall *PGFN_ON_SENDED)(PCONNECTION pConnection, unsigned int unSendID, unsigned int unLen); typedef void(__stdcall *PGFN_ON_DISCONNECTED)(PCONNECTION pConnection, unsigned int unFlag); void __stdcall GTcpClt_OnThread(unsigned int unThreadContext, unsigned int unThreadHandle, unsigned int unThreadID, BOOL bIsBegin, unsigned int unFlag) { } void __stdcall GTcpClt_OnConnected(unsigned int unPerHandle, void* _NULL, unsigned int unNULL) { } void __stdcall GTcpClt_OnReceived(PCONNECTION pConnection, unsigned char* pBuf, unsigned int unLen) { } void __stdcall GTcpClt_OnSended(PCONNECTION pConnection, unsigned int unSendID, unsigned int unLen) { } void __stdcall GTcpClt_OnDisconnected(PCONNECTION pConnection, unsigned int unFlag) { } */ #define _USE_UNICODE 1 #ifndef _DLL //#define _DLL #endif #ifdef _DLL #define DllExport _declspec(dllexport) #else #define DllExport #endif #define VER_FLAG_WIDE_CHAR 0x01 #define VER_FLAG_BETA 0x02 #define VER_FLAG_ZERO_READ 0x04 #define VER_FLAG_TRIAL 0x08 #define VER_FLAG_DEBUG 0x10 #define HNDS_CONNECT 1 #define HNDS_CONNECTED 2 #define HNDS_DISCONNECT 3 #endif //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 类型定义 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 版本信息 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #if(_USE_UNICODE) DllExport wchar_t* __stdcall GTcpClt_GetVersionName(void); #else DllExport char* __stdcall GTcpClt_GetVersionName(void); #endif DllExport float __stdcall GTcpClt_GetVersionNumber(void); DllExport unsigned int __stdcall GTcpClt_GetVersionFlag(void); //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 版本信息 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 功能函数 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DllExport DWORDLONG __stdcall GTcpClt_GetPhyMemInfo(DWORDLONG* pdwTotal); #if(_USE_UNICODE) DllExport void __stdcall GTcpClt_WriteLog(wchar_t* pstrLog, unsigned int unCode = 0); DllExport void __stdcall GTcpClt_GetHostIP(wchar_t* pstrIP, unsigned int unLen, BOOL bIsInternetIP = FALSE); #else DllExport void __stdcall GTcpClt_WriteLog(char* pstrLog, unsigned int unCode = 0); DllExport void __stdcall GTcpClt_GetHostIP(char* pstrIP, unsigned int unLen, BOOL bIsInternetIP = FALSE); #endif //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 功能函数 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>> PerIoData函数 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DllExport unsigned int __stdcall GTcpClt_GetGBufSize(void); DllExport unsigned int __stdcall GTcpClt_GetIoDataSize(void); DllExport unsigned int __stdcall GTcpClt_GetIoDataUse(void); DllExport unsigned int __stdcall GTcpClt_GetIoDataTotal(void); DllExport float __stdcall GTcpClt_GetIoDataUseRate(void); DllExport unsigned int __stdcall GTcpClt_GetIoDataUseMem(void); //<<<<<<<<<<<<<<<<<<<<<<<<<<<< PerIoData函数 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>> PerHndData函数 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DllExport unsigned int __stdcall GTcpClt_GetHndDataUse(void); DllExport unsigned int __stdcall GTcpClt_GetHndDataTotal(void); DllExport unsigned int __stdcall GTcpClt_GetHndDataSize(void); DllExport float __stdcall GTcpClt_GetHndDataUseRate(void); DllExport unsigned int __stdcall GTcpClt_GetHndDataUseMem(void); //<<<<<<<<<<<<<<<<<<<<<<<<<<<< PerHndData函数 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 信息函数 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DllExport unsigned int __stdcall GTcpClt_GetThreadNumber(void); DllExport unsigned int __stdcall GTcpClt_GetPageSize(void); DllExport unsigned int __stdcall GTcpClt_GetBlockSize(void); DllExport unsigned int __stdcall GTcpClt_GetConnectCount(void); DllExport unsigned int __stdcall GTcpClt_GetThreadRunCount(unsigned int unThreadContext); DllExport unsigned int GTcpClt_GetState(unsigned int unPerHandle); #if(_USE_UNICODE) DllExport wchar_t* __stdcall GTcpClt_GetThreadName(unsigned int unThreadContext); DllExport BOOL __stdcall GTcpSock_GetPerHandleInfo(unsigned int unPerHandle, wchar_t* pstrIP, unsigned int unIPLen, wchar_t* pstrPort, unsigned int unPortLen); DllExport BOOL __stdcall GTcpSock_GetPerHandleName(unsigned int unPerHandle, wchar_t* pstrName, unsigned int unLen); #else DllExport char* __stdcall GTcpClt_GetThreadName(unsigned int unThreadContext); DllExport BOOL __stdcall GTcpSock_GetPerHandleInfo(unsigned int unPerHandle, char* pstrIP, unsigned int unIPLen, char* pstrPort, unsigned int unPortLen); DllExport BOOL __stdcall GTcpSock_GetPerHandleName(unsigned int unPerHandle, char* pstrName, unsigned int unLen); #endif DllExport unsigned int __stdcall GTcpClt_GetProcesserNumber(void); DllExport BOOL __stdcall GTcpClt_IsActive(); DllExport unsigned int __stdcall GTcpClt_GetUseMem(void); //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 信息函数 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 操作函数 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DllExport void* __stdcall GTcpClt_GetPerHandleOwner(unsigned int unPerHandle); DllExport BOOL __stdcall GTcpClt_SetPerHandleOwner(unsigned int unPerHandle, void* pOwner); DllExport PGBUF __stdcall GTcpClt_AllocGBuf(void); DllExport BOOL __stdcall GTcpClt_FreeGBuf(PGBUF pGBuf); DllExport unsigned int __stdcall GTcpClt_PostSendGBuf(unsigned int unPerHandle, PGBUF pGBuf, unsigned int unLen); DllExport unsigned int __stdcall GTcpClt_PostSendBuf(unsigned int unPerHandle, unsigned char* pBuf, unsigned int unLen); DllExport void __stdcall GTcpClt_PostBroadcast(unsigned char* pBuf, unsigned int unLen); //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 操作函数 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 主要函数 DllExport BOOL __stdcall GTcpClt_CloseConnect(unsigned int unPerHandle); #if(_USE_UNICODE) DllExport unsigned int __stdcall GTcpClt_OpenConnect( wchar_t* pstrRemoteIP, wchar_t* pstrRemotePort, wchar_t* pstrLocalIP, PGFN_ON_CONNECTED pfnOnConnected, PGFN_ON_RECEIVED pfnOnReceived, PGFN_ON_SENDED pfnOnSended, PGFN_ON_DISCONNECTED pfnOnDisconnected, void* pOwner = NULL); #else DllExport unsigned int __stdcall GTcpClt_OpenConnect( char* pstrRemoteIP, char* pstrRemotePort, char* pstrLocalIP, PGFN_ON_CONNECTED pfnOnConnected, PGFN_ON_RECEIVED pfnOnReceived, PGFN_ON_SENDED pfnOnSended, PGFN_ON_DISCONNECTED pfnOnDisconnected, void* pOwner = NULL); #endif DllExport BOOL __stdcall GTcpClt_Start(unsigned int unHeartbeatTime = 60, unsigned int unMaxNetDelayTime = 5, unsigned int unGuardThreadSleepTime = 2, PGFN_ON_THREAD pfnOnThread = NULL, unsigned int unHndDataInitNumber = 1000, unsigned int unIoDataInitNumber = 1500, unsigned int unProcesserThreadNumber = 0, unsigned int unWorkerThreadNumber = 0); DllExport void __stdcall GTcpClt_Stop(void); //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 主要函数 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< } /* ... extern "C" */

文件下载

资源详情

[{"title":"( 60 个子文件 1.3MB ) 强大的TcpServer压力测试工具及源码(附突破连接限制的方法和工具)","children":[{"title":"TcpServer","children":[{"title":"强大的TcpServer压力测试工具及源码(附突破连接限制的方法和工具)","children":[{"title":"强大的TcpServer压力测试工具源码(附突破连接限制的方法和工具).doc <span style='color:#111;'> 416.50KB </span>","children":null,"spread":false},{"title":"突破最大连接办法","children":[{"title":"成功例子参数.reg <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"BetterSP2.exe <span style='color:#111;'> 172.00KB </span>","children":null,"spread":false},{"title":"突破最大连接办法.txt <span style='color:#111;'> 2.40KB </span>","children":null,"spread":false}],"spread":true},{"title":"建站源码网.txt <span style='color:#111;'> 1.64KB </span>","children":null,"spread":false},{"title":"G-Sockets(压力测试工具源码)","children":[{"title":"G-TcpServer.h <span style='color:#111;'> 18.42KB </span>","children":null,"spread":false},{"title":"G-TcpClient.h <span style='color:#111;'> 17.32KB </span>","children":null,"spread":false},{"title":"Exe","children":[{"title":"G-TcpClientDemo.exe <span style='color:#111;'> 391.00KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemo.exe <span style='color:#111;'> 307.00KB </span>","children":null,"spread":false},{"title":"技术及用户手册——G-TcpClient Demo(Server Test Tool).doc <span style='color:#111;'> 381.50KB </span>","children":null,"spread":false},{"title":"ServerTestTool.exe <span style='color:#111;'> 391.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"G-TcpClient.lib <span style='color:#111;'> 676.97KB </span>","children":null,"spread":false},{"title":"Demos","children":[{"title":"G-TcpSvrRunInfo","children":[{"title":"resource.h <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 35B </span>","children":null,"spread":false},{"title":"G-TcpSvrRunInfo.h <span style='color:#111;'> 1.87KB </span>","children":null,"spread":false},{"title":"G-TcpSvrRunInfo.cpp <span style='color:#111;'> 12.50KB </span>","children":null,"spread":false},{"title":"G-TcpSvrRunInfo.aps <span style='color:#111;'> 20.96KB </span>","children":null,"spread":false},{"title":"G-TcpSvrRunInfo.rc <span style='color:#111;'> 5.27KB </span>","children":null,"spread":false}],"spread":true},{"title":"G-TcpServerDemo","children":[{"title":"G-TcpServerDemo.rc <span style='color:#111;'> 6.28KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 3.45KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemo.h <span style='color:#111;'> 498B </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemoDlg.cpp <span style='color:#111;'> 14.60KB </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 1024B </span>","children":null,"spread":false},{"title":"ServerDemo.cpp <span style='color:#111;'> 4.62KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemo.vcproj <span style='color:#111;'> 5.98KB </span>","children":null,"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 149B </span>","children":null,"spread":false},{"title":"G-TcpServerDemo.cpp <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemo.aps <span style='color:#111;'> 61.79KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"G-TcpServerDemo.ico <span style='color:#111;'> 21.12KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemo.rc2 <span style='color:#111;'> 373B </span>","children":null,"spread":false}],"spread":false},{"title":"ServerDemo.h <span style='color:#111;'> 13.22KB </span>","children":null,"spread":false},{"title":"G-TcpServerDemoDlg.h <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false}],"spread":false},{"title":"G-TcpClientDemo","children":[{"title":"G-TcpClientDemo.aps <span style='color:#111;'> 62.37KB </span>","children":null,"spread":false},{"title":"resource.h <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"targetver.h <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false},{"title":"G-TcpClientDemoMain.h <span style='color:#111;'> 15.99KB </span>","children":null,"spread":false},{"title":"G-TcpClientDemoDlg.h <span style='color:#111;'> 2.68KB </span>","children":null,"spread":false},{"title":"stdafx.cpp <span style='color:#111;'> 181B </span>","children":null,"spread":false},{"title":"G-TcpClientDemo.cpp <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"ReadMe.txt <span style='color:#111;'> 2.83KB </span>","children":null,"spread":false},{"title":"G-TcpClientDemoDlg.cpp <span style='color:#111;'> 21.42KB </span>","children":null,"spread":false},{"title":"G-TcpClientDemo.vcproj <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"G-TcpClientDemo.h <span style='color:#111;'> 491B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"GTcpClientDemo.rc2 <span style='color:#111;'> 370B </span>","children":null,"spread":false},{"title":"G-TcpClientDemo.ico <span style='color:#111;'> 21.12KB </span>","children":null,"spread":false}],"spread":false},{"title":"G-TcpClientDemo.rc <span style='color:#111;'> 8.15KB </span>","children":null,"spread":false},{"title":"G-TcpClientDemoMain.cpp <span style='color:#111;'> 10.90KB </span>","children":null,"spread":false}],"spread":false},{"title":"G-TcpCltRunInfo","children":[{"title":"resource.h <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"stdafx.h <span style='color:#111;'> 35B </span>","children":null,"spread":false},{"title":"G-TcpCltRunInfo.cpp <span style='color:#111;'> 8.79KB </span>","children":null,"spread":false},{"title":"G-TcpCltRunInfo.rc <span style='color:#111;'> 4.63KB </span>","children":null,"spread":false},{"title":"G-TcpCltRunInfo.aps <span style='color:#111;'> 36.32KB </span>","children":null,"spread":false},{"title":"G-TcpCltRunInfo.h <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false}],"spread":true},{"title":"G-TcpServerDemo.sln <span style='color:#111;'> 911B </span>","children":null,"spread":false},{"title":"G-TcpClientDemo.sln <span style='color:#111;'> 911B </span>","children":null,"spread":false}],"spread":true},{"title":"G-TcpServer.lib <span style='color:#111;'> 699.25KB </span>","children":null,"spread":false}],"spread":true},{"title":"建站源码网.url <span style='color:#111;'> 178B </span>","children":null,"spread":false},{"title":"说明.htm <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明