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

📄 httport.bas

📁 HTTP 2 SOCKET的完整开发包 HTTP 2 SOCKET的完整开发包.rar
💻 BAS
字号:
Const H_SUCCESS = 0
Const H_ERROR_BASE = 65536
Const H_ERROR_WINSOCK_FAILED = H_ERROR_BASE
Const H_ERROR_ALREADY_STARTED = H_ERROR_BASE + 1
Const H_ERROR_NOT_STARTED = H_ERROR_BASE + 2
Const H_ERROR_NO_FREE_SLOTS = H_ERROR_BASE + 3
Const H_ERROR_UNKNOWN_OPTION = H_ERROR_BASE + 4
Const H_ERROR_INVALID_PARAMETER = H_ERROR_BASE + 5
'-------------------------------------------------------------
Const H_OPTION_BASE = 131072
Const H_OPTION_HOST_LIST = H_OPTION_BASE
Const H_OPTION_USER_INFO = H_OPTION_BASE + 1
Const H_OPTION_PROXY = H_OPTION_BASE + 2
Const H_OPTION_DATA_OVERRIDE = H_OPTION_BASE + 3
'-------------------------------------------------------------
Const CONN_USE_AUTO = 0
Const CONN_USE_CONNECT = 1
Const CONN_USE_REMOTE = 2
'-------------------------------------------------------------
Private Type TOptions
strParam1 As String
strParam2 As String
strParam3 As String
End Type
'-------------------------------------------------------------
Private Type TMappingParameters
intStrucSize As Long
wLocalPort As Integer
strRemoteHost As String
wRemotePort As Integer
intAllowLocalOnly As Long
intMode As Long
intMappingId As Long
End Type
'-------------------------------------------------------------
Private Type TMappingStats
intStrucSize As Long
intConnections As Long
intKBytesTransferred As Long
intSockErrors As Long
intHostErrors As Long
intTimeoutErrors As Long
intProtocolErrors As Long
intMemoryErrors As Long
intConnectErrors As Long
intOtherErrors As Long
intFatalErrors As Long
End Type
'-------------------------------------------------------------
Private Type TProxyStats
intStrucSize As Long
intProxyFaults As Long
intHostFaults As Long
intCurrentMode As Long
intDataOverride As Long
End Type
'-------------------------------------------------------------
Private Declare Function H_Start Lib "httport.dll" () As Long
Private Declare Function H_SetOption Lib "httport.dll" (ByVal intOption As Long, ByVal intCount As Long, ByRef ptrParams As TOptions) As Long
Private Declare Function H_CreateMapping Lib "httport.dll" (ByRef ptrMapping As TMappingParameters) As Long
Private Declare Function H_GetListeningPort Lib "httport.dll" (ByVal intMappingId As Long, ByRef intPort As Long) As Long
Private Declare Function H_GetMappingStats Lib "httport.dll" (ByVal intMappingId As Long, ByRef ptrStats As TMappingStats) As Long
Private Declare Function H_GetProxyStats Lib "httport.dll" (ByRef ptrProxyStats As TProxyStats) As Long
Private Declare Function H_DestroyMapping Lib "httport.dll" (ByVal intMappingId As Long) As Long
Private Declare Function H_Stop Lib "httport.dll" () As Long

⌨️ 快捷键说明

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