ghttpStreamEx
Make a HTTP GET request and stream in the response without saving it in memory.
- GHTTPRequest ghttpStreamEx(
- const gsi_char * URL,
- const gsi_char * headers,
- GHTTPPost post,
- GHTTPBool throttle,
- GHTTPBool blocking,
- ghttpProgressCallback progressCallback,
- ghttpCompletedCallback completedCallback,
- void * param );
Routine | Required Header | Distribution |
---|---|---|
ghttpStreamEx | <ghttp.h> | SDKZIP |
Return Value
If less than 0, the request failed and this is a GHTTPRequestError value. Otherwise it identifies the request.
Parameters
- URL
- [in] URL
- headers
- [in] Optional headers to pass with the request. Can be NULL or "".
- post
- [in] Optional data to be posted. Can be NULL.
- throttle
- [in] If true, throttle this connection's download speed.
- blocking
- [in] If true, this call doesn't return until the file has finished streaming.
- progressCallback
- [in] Called whenever new data is received. Can be NULL.
- completedCallback
- [in] Called when the file has finished streaming. Can be NULL.
- param
- [in] Optional free-format user data for use by the callback
Remarks
This function is used to stream in the contents of a web page. The response body is not stored in memory or to disk. It is only passed to the progressCallback as it is received, and the application can do what it wants with the data.
Use ghttpStream for a simpler version of this function.
Section Reference: Gamespy HTTP SDK
See Also: ghttpGetEx, ghttpSaveEx, ghttpStream, ghttpHeadEx, ghttpPostEx