Detailed Description

Performs Http requests independently. Note that you must call Update to keep all the requests active.

Static Public Member Functions

static void SetRate (int fps)
 Sets the rate at which http requests are advanced. More...
 
static void Clear ()
 Clears all active requests. More...
 
static void Request (string url)
 Requests a file over the internet. More...
 
static void Request (string url, OnHttpEvent onDone)
 Requests a file over the internet. More...
 
static void Request (string url, OnHttpEvent onDone, object extraData)
 Requests a file over the internet. More...
 
static void Request (string url, OnHttpEvent onDone, WWWForm form)
 Requests a file over the internet and posts form data to it. More...
 
static string UrlEncode (string text)
 Encodes the given piece of text so it's suitable to go into a post or get string. More...
 
static void Update ()
 Metered. Advances all the currently active http requests. More...
 
static void Flush ()
 Advances all the currently active http requests. More...
 
static void UpdateWaitingList ()
 
static void Queue (HttpRequest request)
 

Static Public Attributes

static float UpdateTimer
 The time since the last update in seconds. More...
 
static HttpRequest LastRequest
 Active http requests are stored in a linked list. This is the tail of the list. More...
 
static HttpRequest FirstRequest
 Active http requests are stored in a linked list. This is the head of the list. More...
 
static int CurrentActiveRequests
 The amount of requests that are currently active. More...
 
static HttpRequest LastWaitingRequest
 Waiting http requests are stored in a linked list - added here when MaxSimultaneousRequests is exceeded. This is the tail of the list. More...
 
static HttpRequest FirstWaitingRequest
 Waiting http requests are stored in a linked list - added here when MaxSimultaneousRequests is exceeded. This is the head of the list. More...
 
static int MaxSimultaneousRequests =-1
 The maximum amount of simultaneous requests that will be allowed. Exceeding this will result in the additional requests entering the waiting list. -1 (default) is no limit. More...
 

Static Private Attributes

static float TimerLimit =0.1f
 The time in seconds between updates. More...
 

Member Function Documentation

static void UnityHttp.Http.Clear ( )
inlinestatic

Clears all active requests.

static void UnityHttp.Http.Flush ( )
inlinestatic

Advances all the currently active http requests.

static void UnityHttp.Http.Queue ( HttpRequest  request)
inlinestatic
static void UnityHttp.Http.Request ( string  url)
inlinestatic

Requests a file over the internet.

Parameters
urlThe url to request.
static void UnityHttp.Http.Request ( string  url,
OnHttpEvent  onDone 
)
inlinestatic

Requests a file over the internet.

Parameters
urlThe url to request.
onDoneA method to call with the result.
static void UnityHttp.Http.Request ( string  url,
OnHttpEvent  onDone,
object  extraData 
)
inlinestatic

Requests a file over the internet.

Parameters
urlThe url to request.
onDoneA method to call with the result.
extraDataAn object which will be available in the onDone method.
static void UnityHttp.Http.Request ( string  url,
OnHttpEvent  onDone,
WWWForm  form 
)
inlinestatic

Requests a file over the internet and posts form data to it.

Parameters
urlThe url to request.
onDoneA method to call with the result.
formA http form to send with the request.
static void UnityHttp.Http.SetRate ( int  fps)
inlinestatic

Sets the rate at which http requests are advanced.

Parameters
fpsThe rate in frames per second.
static void UnityHttp.Http.Update ( )
inlinestatic

Metered. Advances all the currently active http requests.

static void UnityHttp.Http.UpdateWaitingList ( )
inlinestatic
static string UnityHttp.Http.UrlEncode ( string  text)
inlinestatic

Encodes the given piece of text so it's suitable to go into a post or get string.

Parameters
textThe text to encode.
Returns
The url encoded text.

Member Data Documentation

int UnityHttp.Http.CurrentActiveRequests
static

The amount of requests that are currently active.

HttpRequest UnityHttp.Http.FirstRequest
static

Active http requests are stored in a linked list. This is the head of the list.

HttpRequest UnityHttp.Http.FirstWaitingRequest
static

Waiting http requests are stored in a linked list - added here when MaxSimultaneousRequests is exceeded. This is the head of the list.

HttpRequest UnityHttp.Http.LastRequest
static

Active http requests are stored in a linked list. This is the tail of the list.

HttpRequest UnityHttp.Http.LastWaitingRequest
static

Waiting http requests are stored in a linked list - added here when MaxSimultaneousRequests is exceeded. This is the tail of the list.

int UnityHttp.Http.MaxSimultaneousRequests =-1
static

The maximum amount of simultaneous requests that will be allowed. Exceeding this will result in the additional requests entering the waiting list. -1 (default) is no limit.

float UnityHttp.Http.TimerLimit =0.1f
staticprivate

The time in seconds between updates.

float UnityHttp.Http.UpdateTimer
static

The time since the last update in seconds.