⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httport.h

📁 HTTP 2 SOCKET的完整开发包 HTTP 2 SOCKET的完整开发包.rar
💻 H
字号:
#ifndef httport_h_included
#define httport_h_included

//-------------------------------------------------------------------------------------------

#define H_SUCCESS 0

#define H_ERROR_BASE 0x10000
#define H_ERROR_WINSOCK_FAILED H_ERROR_BASE
#define H_ERROR_ALREADY_STARTED (H_ERROR_BASE + 1)
#define H_ERROR_NOT_STARTED (H_ERROR_BASE + 2)
#define H_ERROR_NO_FREE_SLOTS (H_ERROR_BASE + 3)
#define H_ERROR_UNKNOWN_OPTION (H_ERROR_BASE + 4)
#define H_ERROR_INVALID_PARAMETER (H_ERROR_BASE + 5)

#define H_OPTION_BASE 0x20000
#define H_OPTION_HOST_LIST H_OPTION_BASE
#define H_OPTION_USER_INFO (H_OPTION_BASE + 1)
#define H_OPTION_PROXY (H_OPTION_BASE + 2)
#define H_OPTION_DATA_OVERRIDE (H_OPTION_BASE + 3)

#define CONN_USE_AUTO 0
#define CONN_USE_CONNECT 1
#define CONN_USE_REMOTE 2

//-------------------------------------------------------------------------------------------

#define HRetCode unsigned long

typedef struct
{
	long intStrucSize;
	unsigned short wLocalPort;
	char *ptrRemoteHost;
	unsigned short wRemotePort;
	long intAllowLocalOnly;
	long intMode;
	long intMappingId;
}
TMappingParameters;

typedef struct
{
	long intStrucSize;
	long intConnections;
	long intKBytesTransferred;
	long intSockErrors;
	long intHostErrors;
	long intTimeoutErrors;
	long intProtocolErrors;
	long intMemoryErrors;
	long intConnectErrors;
	long intOtherErrors;
	long intFatalErrors;
}
TMappingStats;

typedef struct
{
	long intStrucSize;
	long intProxyFaults;
	long intHostFaults;
	long intCurrentMode;
	long intDataOverride;
}
TProxyStats;

//-------------------------------------------------------------------------------------------

 typedef HRetCode (__stdcall H_Start)(void);
 typedef HRetCode (__stdcall H_SetOption)(long intOption, long intCount, char **ptrParams);
 typedef HRetCode (__stdcall H_CreateMapping)(TMappingParameters *ptrParams);
 typedef HRetCode (__stdcall H_GetListeningPort)(long intIndex, long *ptrPort);
 typedef HRetCode (__stdcall H_GetMappingStats)(long intIndex, TMappingStats *ptrStats);
 typedef HRetCode (__stdcall H_GetProxyStats)(TProxyStats *ptrStats);
 typedef HRetCode (__stdcall H_DestroyMapping)(long intIndex);
 typedef HRetCode (__stdcall H_Stop)(void);

//-------------------------------------------------------------------------------------------

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -