ghttpStream

GameSpy SDK

ghttpStream

Make a HTTP GET request and stream in the response without saving it in memory.

GHTTPRequest ghttpStream(
const gsi_char * URL,
GHTTPBool blocking,
ghttpProgressCallback progressCallback,
ghttpCompletedCallback completedCallback,
void * param );
RoutineRequired HeaderDistribution
ghttpStream<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
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 ghttpStreamEx for extra optional parameters.