NIM HTTP提供的http传输相关接口的定义
More...
Go to the source code of this file.
|
#define | INVALID_HTTPREQUESTHANDLE (0) |
|
#define | INVALID_HTTPREQUESTID (0xFFFFFFFF) |
|
|
typedef void * | HttpRequestHandle |
|
typedef unsigned int | HttpRequestID |
|
typedef void(* | nim_http_request_completed_cb) (const void *user_data, bool result, int response_code) |
|
typedef void(* | nim_http_request_response_cb) (const void *user_data, bool result, int response_code, const char *response_content) |
|
typedef void(* | nim_http_request_response_ex_cb) (const void *user_data, bool result, int response_code, const char *response_content, const char *response_header) |
|
typedef void(* | nim_http_request_progress_cb) (const void *user_data, double total_upload_size, double uploaded_size, double total_download_size, double downloaded_size) |
|
typedef void(* | nim_http_request_transfer_cb) (const void *user_data, double actual_upload_size, double upload_speed, double actual_download_size, double download_speed) |
|
typedef void(* | nim_http_request_speed_cb) (const void *user_data, double upload_speed, double download_speed) |
|
|
enum | NIMProxyType {
kNIMProxyNone = 0
, kNIMProxyHttp11 = 1
, kNIMProxySocks4 = 4
, kNIMProxySocks4a = 5
,
kNIMProxySocks5 = 6
, kNIMProxyNrtc = 10
, kNIMProxyNone = 0
, kNIMProxyHttp11 = 1
,
kNIMProxySocks4 = 4
, kNIMProxySocks4a = 5
, kNIMProxySocks5 = 6
, kNIMProxySocks5HostName = 7
} |
|
NIM HTTP提供的http传输相关接口的定义
- Copyright
- (c) 2015-2016, NetEase Inc. All rights reserved
- Author
- towik, Oleg
- Date
- 2015/4/30
◆ HttpRequestHandle
◆ HttpRequestID
http任务ID,当请求发送后会生成此ID,取消任务或读取应答头都使用该ID
◆ nim_http_request_completed_cb
void(* nim_http_request_completed_cb)(const void *user_data, bool, int) |
nim callback function that has been registered in nim_http_create_*** API
- Parameters
-
[out] | user_data | 回传的自定义数据 |
[out] | result | 传输结果,true代表传输成功,false代表传输失败 |
[out] | response_code | http响应码 |
- Returns
- void 无返回值
◆ nim_http_request_progress_cb
void(* nim_http_request_progress_cb)(const void *user_data, double total_upload_size, double uploaded_size, double total_download_size, double downloaded_size) nim callback function that has been registered in nim_http_set_request_progress_cb API |
- Parameters
-
[out] | user_data | 回传的自定义数据 |
[out] | total_upload_size | 总的待上传的字节数 |
[out] | uploaded_size | 已经上传的字节数 |
[out] | total_download_size | 总的待下载的字节数 |
[out] | downloaded_size | 已经下载的字节数 |
- Returns
- void 无返回值
◆ nim_http_request_response_cb
void(* nim_http_request_response_cb)(const void *user_data, bool result, int response_code, const char *response_content) |
nim callback function that has been registered in nim_http_create_*** API
- Parameters
-
[out] | user_data | 回传的自定义数据 |
[out] | result | 传输结果,true代表传输成功,false代表传输失败 |
[out] | response_code | http响应码 |
[out] | response_content | http响应实体内容 |
- Returns
- void 无返回值
◆ nim_http_request_response_ex_cb
void(* nim_http_request_response_ex_cb)(const void *user_data, bool result, int response_code, const char *response_content, const char *response_header) nim callback function that has been registered in nim_http_create_ ***API |
- Parameters
-
[out] | user_data | 回传的自定义数据 |
[out] | result | 传输结果,true代表传输成功,false代表传输失败 |
[out] | response_code | http响应码 |
[out] | response_content | http响应实体内容 |
[out] | response_header | http响应头 |
- Returns
- void 无返回值
◆ nim_http_request_speed_cb
void(* nim_http_request_speed_cb)(const void *user_data, double, double) |
nim callback function that has been registered in nim_http_set_request_speed_cb API
- Parameters
-
[out] | user_data | 回传的自定义数据 |
[out] | upload_speed | 实时上传速度(字节每秒) |
[out] | download_speed | 实时下载速度(字节每秒) |
- Returns
- void 无返回值
◆ nim_http_request_transfer_cb
void(* nim_http_request_transfer_cb)(const void *user_data, double total_upload_size, double uploaded_size, double total_download_size, double downloaded_size) nim callback function that has been registered in nim_http_set_request_transfer_cb API |
- Parameters
-
[out] | user_data | 回传的自定义数据 |
[out] | actual_upload_size | 实际上传的字节数 |
[out] | upload_speed | 平均上传速度(字节每秒) |
[out] | actual_download_size | 实际下载的字节数 |
[out] | download_speed | 平均下载速度(字节每秒) |
- Returns
- void 无返回值
◆ NIMProxyType
Enumerator |
---|
kNIMProxyNone | 不使用代理
|
kNIMProxyHttp11 | HTTP 1.1 Proxy(暂不支持)
|
kNIMProxySocks4 | Socks4 Proxy.
|
kNIMProxySocks4a | Socks4a Proxy.
|
kNIMProxySocks5 | Socks5 Proxy.
|
kNIMProxyNrtc | 云信音视频私有代理,只在nim_vchat_set_proxy中有效
|
kNIMProxyNone | 不使用代理
|
kNIMProxyHttp11 | HTTP 1.1 Proxy
|
kNIMProxySocks4 | Socks4 Proxy
|
kNIMProxySocks4a | Socks4a Proxy
|
kNIMProxySocks5 | Socks5 Proxy
|
kNIMProxySocks5HostName | Socks5 host Proxy
|