Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

HTTP Class Reference

Functionality to request HTTP resources. More...

Inheritance diagram for HTTP:

Singleton< HTTP >

List of all members.


Classes

struct  Request

Public Types

enum  RequestStatus {
  Status_Connecting, Status_Pending, Status_Completed, Status_Failed,
  Status_TimedOut, Status_Invalid
}

Public Member Functions

 HTTP ()
 ~HTTP ()
void Update (float deltaTime)
int Request_Get (const char *url, float timeOut=0.0f)
int Request_Post (const char *url, const void *data, int size, float timeOut=0.0f)
RequestStatus GetRequestStatus (int requestHandle)
float GetPercentageReceived (int requestHandle)
HTTP_ResourceGetResource (int requestHandle)
void DiscardRequest (int requestHandle)

Detailed Description

Functionality to request HTTP resources.

Author:
Mattias Gustavsson
The HTTP system provides high-level functionality for executing HTTP GET and HTTP POST requests, and to receive the response from the server.

All network requests are done asynchronously, so when you issue a request, you're given a handle, and using this handle,

Definition at line 29 of file HTTP.h.


Member Enumeration Documentation

Enumerator:
Status_Connecting 
Status_Pending 
Status_Completed 
Status_Failed 
Status_TimedOut 
Status_Invalid 

Definition at line 40 of file HTTP.h.


Constructor & Destructor Documentation

HTTP::HTTP (  ) 

Definition at line 14 of file HTTP.cpp.

HTTP::~HTTP (  ) 

Definition at line 22 of file HTTP.cpp.


Member Function Documentation

void HTTP::Update ( float  deltaTime  ) 

Definition at line 34 of file HTTP.cpp.

int HTTP::Request_Get ( const char *  url,
float  timeOut = 0.0f 
)

Definition at line 218 of file HTTP.cpp.

int HTTP::Request_Post ( const char *  url,
const void *  data,
int  size,
float  timeOut = 0.0f 
)

Definition at line 272 of file HTTP.cpp.

HTTP::RequestStatus HTTP::GetRequestStatus ( int  requestHandle  ) 

Definition at line 327 of file HTTP.cpp.

float HTTP::GetPercentageReceived ( int  requestHandle  ) 

Definition at line 342 of file HTTP.cpp.

HTTP_Resource * HTTP::GetResource ( int  requestHandle  ) 

Definition at line 357 of file HTTP.cpp.

void HTTP::DiscardRequest ( int  requestHandle  ) 

Definition at line 366 of file HTTP.cpp.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.