Main Page | Class List | Directories | File List | Class Members

RNReplicaNet::XPURL Class Reference

#include <XPURL.h>

List of all members.

Public Member Functions

 XPURL ()
virtual ~XPURL ()
void BeginEnumerateTransports (void)
TransportEnumerateTransports (void)
std::string ParseURLs (const std::string urls)
void Poll (void)
void SetManualPoll (void)
void SetAutomaticPoll (void)

Static Public Member Functions

static void RegisterTransport (Transport &transport)
static void RegisterDefaultTransports (void)
static TransportFindTransport (const std::string url)
static void InitialiseNetwork (const bool hardware=false)
static void ShutdownNetwork (const bool hardware=false)
static DebugHandlerRegisterDebugHandler (DebugHandler *debugHandler=0)
static DebugHandlerGetDebugHandler (void)


Detailed Description

XPURL decodes and encodes URLs and acts as a common method for interfacing various networking protocols.


Constructor & Destructor Documentation

RNReplicaNet::XPURL::XPURL  ) 
 

The ctor for an XPURL

virtual RNReplicaNet::XPURL::~XPURL  )  [virtual]
 

The dtor for an XPURL This cleans up everything for this class


Member Function Documentation

void RNReplicaNet::XPURL::BeginEnumerateTransports void   ) 
 

Starts enumerating the current number of Transport types

Transport* RNReplicaNet::XPURL::EnumerateTransports void   ) 
 

Enumerates the Transport list, BeginEnumerateTransports() must be called before this function Call this function repeatedly in a loop to enumerate through the list

Returns:
the next Transport pointer in the list

static Transport* RNReplicaNet::XPURL::FindTransport const std::string  url  )  [static]
 

Finds the matching Transport for the URL

Returns:
The new Transport pointer for which Allocate() should be called to create a usable Transport pointer

static DebugHandler* RNReplicaNet::XPURL::GetDebugHandler void   )  [static]
 

Returns the debug handler set by RegisterDebugHandler() or null.

Returns:
The debug handler or null if no debugger handler is registered.

static void RNReplicaNet::XPURL::InitialiseNetwork const bool  hardware = false  )  [static]
 

Causes the network layer to start. This can include all system level hardware on the target platform.

Parameters:
hardware Set this to be true to initialise all network hardware. The default is false. It is not necessary to manually call this since the network will start automatically when the first network related function is used.

std::string RNReplicaNet::XPURL::ParseURLs const std::string  urls  ) 
 

Parses a URL and after each iteration returns a tokenised URL. The first time this function is called pass in the whole URL and on subsequent calls pass in ""

Returns:
Each iteration returns a single URL or "" to denote an end to the list of URLs

void RNReplicaNet::XPURL::Poll void   ) 
 

This polls XPURL. Normally an application will yield enough time during threads for XPURL to function. Sometimes an application that uses a lot of 3D graphics can lock out other threads for quite some time. In these cases you may call XPURL::Poll() to yield some time to XPURL to perform housekeeping. If a reliable UDP transport is being used this function will also poll the reliable UDP manager.
Single threaded considerations:
When using the single threaded libraries this method should be called regularly. Unless XPSession::Poll() or ReplicaNet::Poll() is called in which case the default action is that this Poll() method is called.

static DebugHandler* RNReplicaNet::XPURL::RegisterDebugHandler DebugHandler debugHandler = 0  )  [static]
 

This registers an extendible debug handler for use by XPURL, XPSession, ReplicaNet and the Visual Debugger. A PlatformHeap::ForceFree() will delete the active currently registered DebugHandler class. The application can use RegisterDebugHandler() without a parameter to unregister the DebugHandler and avoid the handler being automatically freed by PlatformHeap::ForceFree().

Parameters:
debugHandler A pointer to an instance of the debug handler class. The default value is null which disables the debugger output.
Returns:
The previous debug handler pointer or null if no debugger handler was registered.

static void RNReplicaNet::XPURL::RegisterDefaultTransports void   )  [static]
 

This static member function registers all of the default transports such as reliable UDP.

static void RNReplicaNet::XPURL::RegisterTransport Transport transport  )  [static]
 

Registers a Transport pointer with the URL decoder

Parameters:
transport the Transport to register

void RNReplicaNet::XPURL::SetAutomaticPoll void   ) 
 

Sets the automatic Poll() method for this class and the reliable UDP manager.
In multi-threading libraries this restarts the automatic polling thread so that an application does not need the call Poll()
In single-threading libraries this method has no effect and does not start a thread.
The default multi-threading library behaviour is to enable multi-threading automatic polls,
The default single-threading library behaviour is to use manual polls,

void RNReplicaNet::XPURL::SetManualPoll void   ) 
 

Sets the manual Poll() method for this class and the reliable UDP manager.
For multi-threaded libraries this turns off the automatic polling method.
This allows an application to time exactly when polls are done.
The application must call Poll() on a regular basis. A good place is just before or after the frame update is done.

static void RNReplicaNet::XPURL::ShutdownNetwork const bool  hardware = false  )  [static]
 

Forces the network layer to shutdown if it is started. This can include all system level hardware on the target platform. This should only be used after users of XPURL classes, such as XPSession and ReplicaNet, have been freed. This does not free all internal allocated memory blocks, an example would be for registered factory classes. To force all internal allocated memory to be released RNReplicaNet::PlatformHeap::ForceFree() should be called. A PlatformHeap::ForceFree() will call ShutdownNetwork(true).

Parameters:
hardware Set this to be true to shutdown all network hardware. The default is false.


The documentation for this class was generated from the following file:
Generated on Sun Oct 30 01:12:17 2005 for XPURL by  doxygen 1.4.1