XPURL: XPURL Index Page

XPURL Index Page

1

Introduction

RNReplicaNet::XPURL decodes and encodes URLs and acts as a common method for interfacing various networking protocols.
A Transport is a high level network connection that can be found or registered by RNReplicaNet::XPURL.
For testing purposes the network performance, even of local host tests, can be emulated by the RNReplicaNet::NetworkEmulation class.

Using XPURL

Include files are in the Includes directory.
Use "RNXPURL/Inc/XPURL.h" to access all the C++ interface to XPURL

Using XPURL

Libraries for static linking are called:
RNXPURLDS and RNXPURLRS for debug and release single thread applications.
RNXPURLDM and RNXPURLRM for debug and release multi-threaded applications.
RNXPURLDMDLL and RNXPURLRMDLL for debug and release multi-threaded DLL applications.
The following library files can be used to force the module to use DLL files to link at runtime.
DLLRNXPURLDS and DLLRNXPURLRS for debug and release single thread applications.
DLLRNXPURLDM and DLLRNXPURLRM for debug and release multi-threaded applications.
DLLRNXPURLDMDLL and DLLRNXPURLRMDLL for debug and release multi-threaded DLL applications.

The libraries that start with "DLL" will force the library DLL to be loaded at run time. When using the DLL libraries you must define DOREPNETEXPORTAPI in the preprocessor. This ensures importing of the correct dll functions. It also automatically does #include "RNPlatform/Inc/MemoryTracking.h" The memory tracking header is needed to ensure that the dll calling method accounts for memory properly. The automatic inclusion of the header during DLL builds can be turned off by defining REPLICANET_NOAUTOMATICINCLUDEMEMORYTRACKING For non-dll builds the memory tracking header is not automatically included. Specifically for ReplicaNet and DLL builds, REPLICANET_DLLPREREGISTER() must used called before the ReplicaNet class is allocated. This ties the object classes to the DLL. REPLICANET_DLLPREREGISTER() can also be called in a non-DLL build without any adverse side effects.
The memory tracking header ("RNPlatform/Inc/MemoryTracking.h") can be auto included by defining REPLICANET_ALWAYSDOMEMORYTRACKING for non-dll based builds.
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1


XPURL: File Index

XPURL File List

Here is a list of all documented files with brief descriptions:
DebugHandler.h [code]
NetworkEmulation.h [code]
Transport.h [code]
TransportConfig.h [code]
XPURL.h [code]


XPURL: Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
RNReplicaNet::DebugHandler
RNReplicaNet::NetworkEmulation
RNReplicaNet::Transport
RNReplicaNet::TransportConfig
RNReplicaNet::XPURL
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1


XPURL: RNReplicaNet::DebugHandler Class Reference

RNReplicaNet::DebugHandler

RNReplicaNet::DebugHandler Class Reference

#include <DebugHandler.h>

List of all members.

Public Member Functions

virtual void | DebugPrint (const char *)
virtual bool | OutputToSocket (const char *text)
virtual bool | EnableVisualDebuggerSocket (const int port=8000)
virtual void | DisableVisualDebuggerSocket (void)
virtual void | Printf (const char *format,...)
virtual void | Poll (void)
virtual bool | GotConnection (void) const
virtual void | CallbackConnectionError (const int error)

Detailed Description

DebugHandler is a base class for handling debug messages output by RNXPURL, RNXPSession and RNReplicaNet. The implementation of DebugHandler::DebugPrint() can be extended by the application. The default implementation of DebugPrint() is to call OutputToSocket() with the debug text.
// Define the class
class ApplicationDebugHandler : public RNReplicaNet::DebugHandler
{
public:
    ApplicationDebugHandler() {};
    virtual ~ApplicationDebugHandler() {};

    void DebugPrint(const char *text)
    {
        // TODO: Add applications specific code here

        // And optionally call the base class function
        RNReplicaNet::DebugHandler::DebugPrint(text);
    }
};

#ifdef REPLICANET_VISUALDEBUGGER
// In the application code, to enable the debug output
RNReplicaNet::XPURL::RegisterDebugHandler(new ApplicationDebugHandler());
RNReplicaNet::XPURL::GetDebugHandler()->ConnectToVisualDebugger();
#endif
The class also contains a simple mechanism for starting a listen socket for a single connection from the ReplicaNet Visual Debugger application.

Member Function Documentation

virtual void RNReplicaNet::DebugHandler::CallbackConnectionError ( const int error ) [virtual]

This virtual function is called when there is a connection error.

Parameters:
error This contains a transport specific error. Typically negative values indicate a fatal error while positive errors indicate non-fatal errors.

virtual void RNReplicaNet::DebugHandler::DebugPrint ( const char * ) [virtual]

A virtual function that an application can implement to enable debug output. The default implementation calls OutputToSocket()

virtual void RNReplicaNet::DebugHandler::DisableVisualDebuggerSocket ( void ) [virtual]

This frees the socket used for the Visual Debugger connection. If connected to the Visual Debugger, this terminates the connection. If there is no socket allocated or connected this function does nothing. A PlatformHeap::ForceFree() will also disconnect any active Visual Debugger connection.

virtual bool RNReplicaNet::DebugHandler::EnableVisualDebuggerSocket ( const int port = 8000 ) [virtual]

This enables a TCP listen socket that can be used for connections from the Visual Debugger to this debug session. This function always calls DisableVisualDebuggerSocket() first.

Parameters:
port The port number to listen on. The default is 8000.
Returns:
Indicates an error occurred if true, false means no error.

virtual bool RNReplicaNet::DebugHandler::GotConnection ( void ) const [virtual]

Returns the state of the socket connection.

Returns:
Returns true if there is an accepted connection, false if not.

virtual bool RNReplicaNet::DebugHandler::OutputToSocket ( const char * text ) [virtual]

Outputs some text to the debug socket.

Parameters:
text The text
Returns:
Indicates an error occurred if true while sending the text, false indicates no error.

virtual void RNReplicaNet::DebugHandler::Poll ( void ) [virtual]

Called regularly by the library hosting the debug connection. Can also be called by the user.

virtual void RNReplicaNet::DebugHandler::Printf | ( | const char * | format,
 |  |  | ...
 | ) | [virtual]

A variable argument printf style function that uses DebugPrint() to output the result

Parameters:
format The format, like printf.

The documentation for this class was generated from the following file:
  • DebugHandler.h


XPURL: RNReplicaNet::NetworkEmulation Class Reference

RNReplicaNet::NetworkEmulation

RNReplicaNet::NetworkEmulation Class Reference

#include <NetworkEmulation.h>

List of all members.

Public Types

enum ConnectionTypes {
kPerfect = 0, kModem28k, kModem56k, kDSL512MB_Down128Up,
kLAN
}

Static Public Member Functions

static void | SetEnabled (const bool enable=false)
static bool | GetEnabled (void)
static void | SetConnection (const ConnectionTypes type=kPerfect, const bool enable=true)
static void | SetPacketLoss (const float percent=0)
static float | GetPacketLoss (void)
static void | SetMaximumOutputBandwidth (const int bytesPerSecond=0)
static int | GetMaximumOutputBandwidth (void)
static void | SetMaximumInputBandwidth (const int bytesPerSecond=0)
static int | GetMaximumInputBandwidth (void)
static void | SetAverageLatency (const float milliSeconds=0.0f)
static float | GetAverageLatency (void)
static void | SetJitter (const float milliSeconds=0.0f)
static float | GetJitter (void)

Detailed Description

NetworkEmulation allows various emulated network settings to be changed to allow the user to test their application with emulated packet loss, latency, jitter and bandwidth controls.
This class is a static access class.

Member Enumeration Documentation

enum RNReplicaNet::NetworkEmulation::ConnectionTypes

Enumeration for the SetConnection function for standard types of connection

Enumeration values:
kPerfect | No packet loss, latency or bandwidth impairment.
kModem28k | Simulates a 28k analogue modem
kModem56k | Simulates a 56k analogue modem
kDSL512MB_Down128Up | Simulates a common type of DSL connection
kLAN | Simulates a LAN network

Member Function Documentation

static float RNReplicaNet::NetworkEmulation::GetAverageLatency ( void ) [static]

Reads the configuration value set by SetAverageLatency()

Returns:
the configured value

static bool RNReplicaNet::NetworkEmulation::GetEnabled ( void ) [static]

Allows the network emulation activation status to be read

Returns:
true is the network emulation is enabled

static float RNReplicaNet::NetworkEmulation::GetJitter ( void ) [static]

Reads the configuration value set by SetJitter()

Returns:
the configured value

static int RNReplicaNet::NetworkEmulation::GetMaximumInputBandwidth ( void ) [static]

Reads the configuration value set by GetMaximumInputBandwidth().

Returns:
the configured value

static int RNReplicaNet::NetworkEmulation::GetMaximumOutputBandwidth ( void ) [static]

Reads the configuration value set by SetMaximumOutputBandwidth()

Returns:
the configured value

static float RNReplicaNet::NetworkEmulation::GetPacketLoss ( void ) [static]

This allows the configured emulated packet loss to be read.

Returns:
the emulated packet loss value

static void RNReplicaNet::NetworkEmulation::SetAverageLatency ( const float milliSeconds = 0.0f ) [static]

Sets the average packet latency, this is half round trip time.

Parameters:
milliSeconds the latency in seconds. So setting this to be 0.1f will mean a packet latency of 100ms is used. The default value is 0 meaning there is no latency.

static void RNReplicaNet::NetworkEmulation::SetConnection | ( | const ConnectionTypes | type = kPerfect,
 |  | const bool | enable = true
 | ) | [static]

Allows the network emulation parameters to be set quickly for various standard testing types

Parameters:
type | the type of connection to emulate
enable | enable or disable the emulation

static void RNReplicaNet::NetworkEmulation::SetEnabled ( const bool enable = false ) [static]

Allows the network emulation to be turned on or off

Parameters:
enable set this to be true or false to turn on or off the network emulation. The default is false.

static void RNReplicaNet::NetworkEmulation::SetJitter ( const float milliSeconds = 0.0f ) [static]

Allows the amount by which the latency value can fluctuate

Parameters:
milliSeconds the jitter in seconds. So setting this to be 0.05f and latency to 0.1f will mean a packet latency of 50ms to 150ms (100ms +-50ms) can be used. The default value is 0 meaning there is no jitter.

static void RNReplicaNet::NetworkEmulation::SetMaximumInputBandwidth ( const int bytesPerSecond = 0 ) [static]

Sets the maximum input bandwidth for emulation.

Parameters:
bytesPerSecond the bandwidth in bytes per second. The default value is 0 meaning there is no limit.

static void RNReplicaNet::NetworkEmulation::SetMaximumOutputBandwidth ( const int bytesPerSecond = 0 ) [static]

Sets the maximum output bandwidth for emulation.

Parameters:
bytesPerSecond the bandwidth in bytes per second. The default value is 0 meaning there is no limit.

static void RNReplicaNet::NetworkEmulation::SetPacketLoss ( const float percent = 0 ) [static]

This sets the emulated packet loss for the network layer.

Parameters:
percent Sets the emulated packet loss level where percent is any value from 0 to 100 percent packet loss. The default value is 0 meaning no packet loss.

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


XPURL: RNReplicaNet::Transport Class Reference

RNReplicaNet::Transport

RNReplicaNet::Transport Class Reference

#include <Transport.h>

List of all members.

Public Types

enum | Error { kTransport_EOK = 0, kTransport_EERROR = -1, kTransport_ECANTLISTENONCHANNEL = -2, kTransport_EWAITING = -3 }
enum | Bandwidth { kBandwidth_Off = 0, kBandwidth_Connection = 1 }

Public Member Functions

Transport ()
virtual | ~Transport ()
virtual int | GetPacketsSent (const bool reset=false)
virtual int | GetPacketsSentMerged (const bool reset=false)
virtual int | GetPacketsSentSize (const bool reset=false)
virtual int | GetPacketsReceived (const bool reset=false)
virtual int | GetPacketsReceivedMerged (const bool reset=false)
virtual int | GetPacketsReceivedSize (const bool reset=false)
virtual int | GetPacketsLost (const bool reset=false)
virtual void | SetBandwidthLimit (const Bandwidth enable=kBandwidth_Off)
virtual Bandwidth | GetBandwidthLimit ()
virtual void | SetMaximumOutputBandwidth (const int bytesPerSecond=0)
virtual int | GetMaximumOutputBandwidth (void)
virtual void | SetMaximumInputBandwidth (const int bytesPerSecond=0)
virtual int | GetMaximumInputBandwidth (void)
virtual std::string | GetPeerURL (void)
virtual bool | GetTransportClosed (void)
virtual void | SetEnableLANDiscovery (const bool enable=true)
virtual bool | GetEnableLANDiscovery (void)
virtual std::string | CanAccept (void)=0
virtual std::string | CanRoute (void)=0
virtual std::string | ExportURL (void)=0
virtual Transport * | Allocate (void)=0
virtual Error | Listen (const int channel=TransportAnyGameChannel)=0
virtual Error | Connect (const std::string address)=0
virtual Transport * | Accept (void)=0
virtual Error | Send (const char *data, const int len)=0
virtual Error | SendReliable (const char *data, const int len)=0
virtual Error | SendCertain (const char *data, const int len)=0
virtual int | Recv (char *const data, const int maxlen)=0
virtual int | GetMaxPacketSize (void)=0
virtual std::string | HandleDiscovery (void)=0
virtual void | HandleDiscoveryReply (const std::string reply)=0
virtual void | BeginDiscovery (void)=0
virtual std::string | GetNextDiscovery (void)=0
virtual Error | GetStatus (void)=0

Detailed Description

A virtual base class that defines a transport layer. Each new Transport is a potential connection to the outside world or a method by which a machine can connect to another machine. Each transport can use any means necessary to accomplish this connection. Each new implementation of a transport class must support the operation of the base class pure virtual members. Naturally a transport need not support the virtual members as default values are returned for these.
The terms "Reliable", "Unreliable" and "Certain" are references to the three packet delivery types used by ReplicaNet, XPSession and XPURL Transport classes.
"Reliable" guarantees delivery of data in the same order it was sent.
"Certain" guarantees delivery of data but the order the data is received may not be preserved.
"Unreliable" does not guarantee delivery of data and the order of the data when it is received may not be preserved.
In general it is a good idea to not use too many "Reliable" updates because this method is quite expensive in terms of network and memory performance. If one packet gets lost it will delay the delivery of all other Reliable data until that packet is resent. The better choice would be to use "Certain" because this is less expensive in terms of memory and network performance. Also if one Certain packet is lost the delivery of other Certain packets is not delayed. Generally use Reliable for those events that absolutely must occur in the same order they were sent.

Member Enumeration Documentation

enum RNReplicaNet::Transport::Error

Standard Transport errors

Enumeration values:
kTransport_EOK | No error
kTransport_EERROR | A fatal error happened, like the connection broke and cannot be recovered
kTransport_ECANTLISTENONCHANNEL | Non-fatal, the transport couldn't listen on the channel. The usual response by the user is to then try to listen on AnyGameChannel
kTransport_EWAITING | Non-fatal, the transport is in the process of waiting to connect or for a connection or to listen

Constructor & Destructor Documentation

RNReplicaNet::Transport::Transport ( )

The ctor performs some basic initialisation

virtual RNReplicaNet::Transport::~Transport ( ) [virtual]

The dtor makes sure everything is tidy

Member Function Documentation

virtual Transport* RNReplicaNet::Transport::Accept ( void ) [pure virtual]

Accepts the first pending connection from another Transport

Returns:
returns NULL if there are no pending Transport connections or a new Transport pointer that can be used to communicate with

virtual Transport* RNReplicaNet::Transport::Allocate ( void ) [pure virtual]

Used to allocate a transport of the relevant class type

Returns:
a Transport pointer

virtual void RNReplicaNet::Transport::BeginDiscovery ( void ) [pure virtual]

This starts the discovery cycle to try to find other transports

virtual std::string RNReplicaNet::Transport::CanAccept ( void ) [pure virtual]

Enables a Transport to state which type of protocol it can receive. Each protocol type is separated by a comma.

Returns:
the comma separated list of protocols supported by the Transport

virtual std::string RNReplicaNet::Transport::CanRoute ( void ) [pure virtual]

Enables a Transport to state which type of protocol it can route. Each protocol type is separated by a comma.

Returns:
the comma separated list of protocols routed by the Transport

virtual Error RNReplicaNet::Transport::Connect ( const std::string address ) [pure virtual]

Tries to connect to a specified address

Parameters:
address the address to connect to
Returns:
A Transport::Error is returned indicating success or failure for the operation

virtual std::string RNReplicaNet::Transport::ExportURL ( void ) [pure virtual]

Exports a URL that is used by this transport and can be used by other Transports to locate this transport.

Returns:
the URL to locate this transport

virtual Bandwidth RNReplicaNet::Transport::GetBandwidthLimit ( ) [virtual]

Reads the configuration value set by SetBandwidthLimit()

Returns:
the configured value

virtual bool RNReplicaNet::Transport::GetEnableLANDiscovery ( void ) [virtual]

Reads the configuration value set by SetEnableLANDiscovery().

Returns:
the configured value.

virtual int RNReplicaNet::Transport::GetMaximumInputBandwidth ( void ) [virtual]

Reads the configuration value set by GetMaximumInputBandwidth().

Returns:
the configured value.

virtual int RNReplicaNet::Transport::GetMaximumOutputBandwidth ( void ) [virtual]

Reads the configuration value set by SetMaximumOutputBandwidth()

Returns:
the configured value

virtual int RNReplicaNet::Transport::GetMaxPacketSize ( void ) [pure virtual]

Gets the maximum packet size that can be transmitted over this Transport. The base spec requires a Transport to cope with packets of at least the number of bytes defined by TransportMinimumPacketSize

Returns:
the maximum packet size that can be transmitted

virtual std::string RNReplicaNet::Transport::GetNextDiscovery ( void ) [pure virtual]

This is the function that can be used to discover other similar transports that can be connected to.

Returns:
Returns a URL, which is the URL passed in by HandleDiscoveryReply()

virtual int RNReplicaNet::Transport::GetPacketsLost ( const bool reset = false ) [virtual]

Gets the total number of packets that were lost and had to be resent.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual int RNReplicaNet::Transport::GetPacketsReceived ( const bool reset = false ) [virtual]

Gets the total number of packets that were received.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual int RNReplicaNet::Transport::GetPacketsReceivedMerged ( const bool reset = false ) [virtual]

Gets the total number of merged packets that were received.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual int RNReplicaNet::Transport::GetPacketsReceivedSize ( const bool reset = false ) [virtual]

Gets the total size of packets that were received.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual int RNReplicaNet::Transport::GetPacketsSent ( const bool reset = false ) [virtual]

Gets the total number of packets that were sent.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual int RNReplicaNet::Transport::GetPacketsSentMerged ( const bool reset = false ) [virtual]

Gets the total number of merged packets that were sent.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual int RNReplicaNet::Transport::GetPacketsSentSize ( const bool reset = false ) [virtual]

Gets the total size of packets that were sent.

Parameters:
reset The default parameter for this function is false. If true then the value is returned as normal but the internal total is reset to zero
Returns:
Returns the total value, since the last reset to zero

virtual std::string RNReplicaNet::Transport::GetPeerURL ( void ) [virtual]

If connected this gets the URL of the other transport. It is possible this function will return a null string when connected if the transport provider does not support this functionality.

Returns:
the URL of the peer transport.

virtual Error RNReplicaNet::Transport::GetStatus ( void ) [pure virtual]

Gets the status of this transport

Returns:
the status

virtual bool RNReplicaNet::Transport::GetTransportClosed ( void ) [virtual]

If this returns false the transport was closed due to an error such as a timeout. If this returns true then the transport was gracefully closed without an error. The default is to return false.

virtual std::string RNReplicaNet::Transport::HandleDiscovery ( void ) [pure virtual]

If a discovery is pending this will return the URL of the source machine that made a discovery request

Returns:
returns the URL of the machine attempting a discovery or a "" string

virtual void RNReplicaNet::Transport::HandleDiscoveryReply ( const std::string reply ) [pure virtual]

This function handles the reply URL that is passed back to the previous calling machine of HandleDiscovery()

Parameters:
reply the reply string to send

virtual Error RNReplicaNet::Transport::Listen ( const int channel = TransportAnyGameChannel ) [pure virtual]

Sets this Transport to listen on a certain channel. The default channel is defined as AnyGameChannel

Parameters:
channel the channel to listen on, for example DefaultGameChannel. This parameter need not be passed in, in which case AnyGameChannel is used.
Returns:
A Transport::Error is returned indicating success or failure for the operation

virtual int RNReplicaNet::Transport::Recv | ( | char *const | data,
 |  | const int | maxlen
 | ) | [pure virtual]

Tries to receive data pending at this Transport. Data packets received by this method cannot be merged together.

Parameters:
data | the data buffer to use
maxlen | the maximum length of this data buffer
Returns:
the length of the data received or zero for no data pending

virtual Error RNReplicaNet::Transport::Send | ( | const char * | data,
 |  | const int | len
 | ) | [pure virtual]

Tries to send data to the currently connected Transport via the "unreliable" method without using any form of packet loss correction.
This method of sending packets is very cheap since there is no packet loss correction.

Parameters:
data | the data to send
len | the length of the data to send
Returns:
A Transport::Error is returned indicating success or failure for the operation

virtual Error RNReplicaNet::Transport::SendCertain | ( | const char * | data,
 |  | const int | len
 | ) | [pure virtual]

Tries to send data to the currently connected Transport via the "certain" method that guarantees delivery of packets but does not gaurantee the packet receive order is maintained.
This method is less expensive than the "reliable" method because send and receive order is not kept.

Parameters:
data | the data to send
len | the length of the data to send
Returns:
A Transport::Error is returned indicating success or failure for the operation

virtual Error RNReplicaNet::Transport::SendReliable | ( | const char * | data,
 |  | const int | len
 | ) | [pure virtual]

Tries to send data to the currently connected Transport via the "reliable" method that guarantees packets are received in the same order they are sent.
This method of sending packets is the most expensive in terms of CPU time and memory buffers

Parameters:
data | the data to send
len | the length of the data to send
Returns:
A Transport::Error is returned indicating success or failure for the operation

virtual void RNReplicaNet::Transport::SetBandwidthLimit ( const Bandwidth enable = kBandwidth_Off ) [virtual]

Sets the bandwidth limit algorithm to be used for this Transport type.

Parameters:
enable The default parameter is kBandwidth_Off which disables any bandwidth limit for this Transport type. kBandwidth_Connection will turn on bandwidth calculation for each instance and connection using this Transport. For example, if there are five instances of this Transport type and kBandwidth_Connection is used with the maximum outgoing bandwidth to be 1000 bytes per second then the maximum combined bandwidth will capped to five times 1000 bytes per second, which is 5000 bytes per second.

virtual void RNReplicaNet::Transport::SetEnableLANDiscovery ( const bool enable = true ) [virtual]

Enables or disables LAN discovery of this transport type.

Parameters:
enable Set this to be true to enable LAN discovery. False will disable LAN discovery. The default is true.

virtual void RNReplicaNet::Transport::SetMaximumInputBandwidth ( const int bytesPerSecond = 0 ) [virtual]

Sets the maximum input bandwidth for emulation.

Parameters:
bytesPerSecond the bandwidth in bytes per second. The default value is 0 meaning there is no limit.

virtual void RNReplicaNet::Transport::SetMaximumOutputBandwidth ( const int bytesPerSecond = 0 ) [virtual]

Sets the maximum output bandwidth for emulation.

Parameters:
bytesPerSecond the bandwidth in bytes per second. The default value is 0 meaning there is no limit.

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


XPURL: RNReplicaNet::TransportConfig Class Reference

RNReplicaNet::TransportConfig

RNReplicaNet::TransportConfig Class Reference

#include <TransportConfig.h>

List of all members.

Static Public Member Functions

static void | SetResendTimes (const int numberOfTimes, const float *retryTimes)
static void | GetResendTimes (int *numberOfTimes, float *retryTimes)
static void | SetPacketBufferTime (const float maxTime=0.0f)
static float | GetPacketBufferTime (void)
static void | PacketBufferBeginCaptureWindow (void)
static void | PacketBufferEndCaptureWindow (const bool kickBuffer=true)
static void | SetPacketBufferEnable (const bool enable=false)
static bool | GetPacketBufferEnable (void)

Detailed Description

This class provides low-level access methods for the Transport mechanism. These values must not be changed once XPURL (or XPSession or ReplicaNet) start to send packets.

Member Function Documentation

static bool RNReplicaNet::TransportConfig::GetPacketBufferEnable ( void ) [static]

Allows the setting for SetPacketBufferEnable() to be read.

Returns:
The setting for SetPacketBufferEnable()

static float RNReplicaNet::TransportConfig::GetPacketBufferTime ( void ) [static]

Allow the packet buffer time to be read.

Returns:
The current packet buffer time.

static void RNReplicaNet::TransportConfig::GetResendTimes | ( | int * | numberOfTimes,
 |  | float * | retryTimes
 | ) | [static]

Allows the resend time delays to be read.

Parameters:
numberOfTimes | A pointer to an int to contain the number of times a packet is resent.
retryTimes | If not null an array of floats large enough to accept the resend times.

static void RNReplicaNet::TransportConfig::PacketBufferBeginCaptureWindow ( void ) [static]

This allows the packet buffer time window to be fine tuned by allowing the application to start buffering all sent packets, regardless of the time specified by SetPacketBufferTime(). Packets will only be sent when the buffers become full. A matching call to PacketBufferEndCapture() must be made to signify when normal packet buffering configured by SetPacketBufferTime() is resumed.

static void RNReplicaNet::TransportConfig::PacketBufferEndCaptureWindow ( const bool kickBuffer = true ) [static]

This is the matching call to PacketBufferBeginCapture() and signifies the end of the packet buffer window.

Parameters:
kickBuffer If true the currently buffered packets will be sent by this function call. If false the currently buffered packets will wait until the time configured by SetPacketBufferTime()

static void RNReplicaNet::TransportConfig::SetPacketBufferEnable ( const bool enable = false ) [static]

This can override all other packet buffering settings. If all packet buffering is disabled then this will save memory allocated for potential packet buffers in the future. This is because the PacketBufferBeginCaptureWindow() could be used at any point in the application and to allow this mechanism to work the transport needs to be warned about there being possible buffered packets. This function must not be used when the network has been started. The default is to disable packet buffering and to not allocate memory for potential packet buffers. SetPacketBufferEnable(true) should be used if any packet buffers are configured for potential use. This configuration option remains in force for the lifetime of the application until a new function call is made.

Parameters:
disable If true the memory for packet buffers is allocated. If false memory for packet buffering is not allocated.

static void RNReplicaNet::TransportConfig::SetPacketBufferTime ( const float maxTime = 0.0f ) [static]

This allow the packet buffer time to be configured for each Transport. The larger the buffer time the more individual packets can be merged into one larger packet before sending. The default value is 0.0f which means this feature is disabled. This configuration option remains in force for the lifetime of the application until a new function call is made.
For example:

    RNReplicaNet::TransportConfig::SetPacketBufferTime(1.0f / 50.0f);
    RNReplicaNet::TransportConfig::SetPacketBufferEnable(true);
Parameters:
maxTime The time for the packet buffer. The default value is 0.0f.

static void RNReplicaNet::TransportConfig::SetResendTimes | ( | const int | numberOfTimes,
 |  | const float * | retryTimes
 | ) | [static]

This allows the delay between reliable packets being resent due to failed ACKs to be altered. These options are provided for advanced users to tweak. Changing these settings can make your XPURL derived network connection unstable, care must be taken. This configuration option remains in force for the lifetime of the application until a new function call is made.

Parameters:
numberOfTimes | The number of times a packet is resent before finally being given up as lost. The maximum number of times that can be configured is 60.
retryTimes | The interval in seconds between each resend of a packet.

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


XPURL: RNReplicaNet::XPURL Class Reference

RNReplicaNet::XPURL

RNReplicaNet::XPURL Class Reference

#include <XPURL.h>

List of all members.

Public Member Functions

XPURL ()
virtual | ~XPURL ()
void | BeginEnumerateTransports (void)
Transport * | EnumerateTransports (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 Transport * | FindTransport (const std::string url)
static void | InitialiseNetwork (const bool hardware=false)
static void | ShutdownNetwork (const bool hardware=false)
static DebugHandler * | RegisterDebugHandler (DebugHandler *debugHandler=0)
static DebugHandler * | GetDebugHandler (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:
  • XPURL.h
Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • Accept() : RNReplicaNet::Transport
  • Allocate() : RNReplicaNet::Transport

- b -

  • BeginDiscovery() : RNReplicaNet::Transport
  • BeginEnumerateTransports() : RNReplicaNet::XPURL

- c -

  • CallbackConnectionError() : RNReplicaNet::DebugHandler
  • CanAccept() : RNReplicaNet::Transport
  • CanRoute() : RNReplicaNet::Transport
  • Connect() : RNReplicaNet::Transport
  • ConnectionTypes : RNReplicaNet::NetworkEmulation

- d -

  • DebugPrint() : RNReplicaNet::DebugHandler
  • DisableVisualDebuggerSocket() : RNReplicaNet::DebugHandler

- e -

  • EnableVisualDebuggerSocket() : RNReplicaNet::DebugHandler
  • EnumerateTransports() : RNReplicaNet::XPURL
  • Error : RNReplicaNet::Transport
  • ExportURL() : RNReplicaNet::Transport

- f -

  • FindTransport() : RNReplicaNet::XPURL

- g -

  • GetAverageLatency() : RNReplicaNet::NetworkEmulation
  • GetBandwidthLimit() : RNReplicaNet::Transport
  • GetDebugHandler() : RNReplicaNet::XPURL
  • GetEnabled() : RNReplicaNet::NetworkEmulation
  • GetEnableLANDiscovery() : RNReplicaNet::Transport
  • GetJitter() : RNReplicaNet::NetworkEmulation
  • GetMaximumInputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • GetMaximumOutputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • GetMaxPacketSize() : RNReplicaNet::Transport
  • GetNextDiscovery() : RNReplicaNet::Transport
  • GetPacketBufferEnable() : RNReplicaNet::TransportConfig
  • GetPacketBufferTime() : RNReplicaNet::TransportConfig
  • GetPacketLoss() : RNReplicaNet::NetworkEmulation
  • GetPacketsLost() : RNReplicaNet::Transport
  • GetPacketsReceived() : RNReplicaNet::Transport
  • GetPacketsReceivedMerged() : RNReplicaNet::Transport
  • GetPacketsReceivedSize() : RNReplicaNet::Transport
  • GetPacketsSent() : RNReplicaNet::Transport
  • GetPacketsSentMerged() : RNReplicaNet::Transport
  • GetPacketsSentSize() : RNReplicaNet::Transport
  • GetPeerURL() : RNReplicaNet::Transport
  • GetResendTimes() : RNReplicaNet::TransportConfig
  • GetStatus() : RNReplicaNet::Transport
  • GetTransportClosed() : RNReplicaNet::Transport
  • GotConnection() : RNReplicaNet::DebugHandler

- h -

  • HandleDiscovery() : RNReplicaNet::Transport
  • HandleDiscoveryReply() : RNReplicaNet::Transport

- i -

  • InitialiseNetwork() : RNReplicaNet::XPURL

- k -

  • kDSL512MB_Down128Up : RNReplicaNet::NetworkEmulation
  • kLAN : RNReplicaNet::NetworkEmulation
  • kModem28k : RNReplicaNet::NetworkEmulation
  • kModem56k : RNReplicaNet::NetworkEmulation
  • kPerfect : RNReplicaNet::NetworkEmulation
  • kTransport_ECANTLISTENONCHANNEL : RNReplicaNet::Transport
  • kTransport_EERROR : RNReplicaNet::Transport
  • kTransport_EOK : RNReplicaNet::Transport
  • kTransport_EWAITING : RNReplicaNet::Transport

- l -

  • Listen() : RNReplicaNet::Transport

- o -

  • OutputToSocket() : RNReplicaNet::DebugHandler

- p -

  • PacketBufferBeginCaptureWindow() : RNReplicaNet::TransportConfig
  • PacketBufferEndCaptureWindow() : RNReplicaNet::TransportConfig
  • ParseURLs() : RNReplicaNet::XPURL
  • Poll() : RNReplicaNet::XPURL, RNReplicaNet::DebugHandler
  • Printf() : RNReplicaNet::DebugHandler

- r -

  • Recv() : RNReplicaNet::Transport
  • RegisterDebugHandler() : RNReplicaNet::XPURL
  • RegisterDefaultTransports() : RNReplicaNet::XPURL
  • RegisterTransport() : RNReplicaNet::XPURL

- s -

  • Send() : RNReplicaNet::Transport
  • SendCertain() : RNReplicaNet::Transport
  • SendReliable() : RNReplicaNet::Transport
  • SetAutomaticPoll() : RNReplicaNet::XPURL
  • SetAverageLatency() : RNReplicaNet::NetworkEmulation
  • SetBandwidthLimit() : RNReplicaNet::Transport
  • SetConnection() : RNReplicaNet::NetworkEmulation
  • SetEnabled() : RNReplicaNet::NetworkEmulation
  • SetEnableLANDiscovery() : RNReplicaNet::Transport
  • SetJitter() : RNReplicaNet::NetworkEmulation
  • SetManualPoll() : RNReplicaNet::XPURL
  • SetMaximumInputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • SetMaximumOutputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • SetPacketBufferEnable() : RNReplicaNet::TransportConfig
  • SetPacketBufferTime() : RNReplicaNet::TransportConfig
  • SetPacketLoss() : RNReplicaNet::NetworkEmulation
  • SetResendTimes() : RNReplicaNet::TransportConfig
  • ShutdownNetwork() : RNReplicaNet::XPURL

- t -

  • Transport() : RNReplicaNet::Transport

- x -

  • XPURL() : RNReplicaNet::XPURL

- ~ -

  • ~Transport() : RNReplicaNet::Transport
  • ~XPURL() : RNReplicaNet::XPURL


XPURL: Directory Hierarchy

XPURL Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • ReplicaNetWork
    • RNXPURL
      • Inc
Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: C:/Work/ReplicaNetWork/ Directory Reference

ReplicaNetWork

ReplicaNetWork Directory Reference

Directories

directory RNXPURL


XPURL: C:/Work/ReplicaNetWork/RNXPURL/ Directory Reference

RNXPURL Directory Reference

Directories

directory | Inc

Files

file | XPURLDoc.cpp


XPURL: C:/Work/ReplicaNetWork/RNXPURL/Inc/ Directory Reference

Inc Directory Reference

Files

file | DebugHandler.h [code]
file | NetworkEmulation.h [code]
file | Transport.h [code]
file | TransportConfig.h [code]
file | XPURL.h [code]


XPURL: Member List

RNReplicaNet::DebugHandler Member List

This is the complete list of members for RNReplicaNet::DebugHandler, including all inherited members.

CallbackConnectionError(const int error) | RNReplicaNet::DebugHandler | [virtual]
DebugHandler() (defined in RNReplicaNet::DebugHandler) | RNReplicaNet::DebugHandler |
DebugPrint(const char *) | RNReplicaNet::DebugHandler | [virtual]
DisableVisualDebuggerSocket(void) | RNReplicaNet::DebugHandler | [virtual]
EnableVisualDebuggerSocket(const int port=8000) | RNReplicaNet::DebugHandler | [virtual]
GotConnection(void) const | RNReplicaNet::DebugHandler | [virtual]
OutputToSocket(const char *text) | RNReplicaNet::DebugHandler | [virtual]
Poll(void) | RNReplicaNet::DebugHandler | [virtual]
Printf(const char *format,...) | RNReplicaNet::DebugHandler | [virtual]
~DebugHandler() (defined in RNReplicaNet::DebugHandler) | RNReplicaNet::DebugHandler | [virtual]

Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: Member List

RNReplicaNet::NetworkEmulation Member List

This is the complete list of members for RNReplicaNet::NetworkEmulation, including all inherited members.

ConnectionTypes enum name | RNReplicaNet::NetworkEmulation |
GetAverageLatency(void) | RNReplicaNet::NetworkEmulation | [static]
GetEnabled(void) | RNReplicaNet::NetworkEmulation | [static]
GetJitter(void) | RNReplicaNet::NetworkEmulation | [static]
GetMaximumInputBandwidth(void) | RNReplicaNet::NetworkEmulation | [static]
GetMaximumOutputBandwidth(void) | RNReplicaNet::NetworkEmulation | [static]
GetPacketLoss(void) | RNReplicaNet::NetworkEmulation | [static]
kDSL512MB_Down128Up enum value | RNReplicaNet::NetworkEmulation |
kLAN enum value | RNReplicaNet::NetworkEmulation |
kModem28k enum value | RNReplicaNet::NetworkEmulation |
kModem56k enum value | RNReplicaNet::NetworkEmulation |
kPerfect enum value | RNReplicaNet::NetworkEmulation |
SetAverageLatency(const float milliSeconds=0.0f) | RNReplicaNet::NetworkEmulation | [static]
SetConnection(const ConnectionTypes type=kPerfect, const bool enable=true) | RNReplicaNet::NetworkEmulation | [static]
SetEnabled(const bool enable=false) | RNReplicaNet::NetworkEmulation | [static]
SetJitter(const float milliSeconds=0.0f) | RNReplicaNet::NetworkEmulation | [static]
SetMaximumInputBandwidth(const int bytesPerSecond=0) | RNReplicaNet::NetworkEmulation | [static]
SetMaximumOutputBandwidth(const int bytesPerSecond=0) | RNReplicaNet::NetworkEmulation | [static]
SetPacketLoss(const float percent=0) | RNReplicaNet::NetworkEmulation | [static]

Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: Member List

RNReplicaNet::Transport Member List

This is the complete list of members for RNReplicaNet::Transport, including all inherited members.

Accept(void)=0 | RNReplicaNet::Transport | [pure virtual]
Allocate(void)=0 | RNReplicaNet::Transport | [pure virtual]
Bandwidth enum name (defined in RNReplicaNet::Transport) | RNReplicaNet::Transport |
BeginDiscovery(void)=0 | RNReplicaNet::Transport | [pure virtual]
CanAccept(void)=0 | RNReplicaNet::Transport | [pure virtual]
CanRoute(void)=0 | RNReplicaNet::Transport | [pure virtual]
Connect(const std::string address)=0 | RNReplicaNet::Transport | [pure virtual]
Error enum name | RNReplicaNet::Transport |
ExportURL(void)=0 | RNReplicaNet::Transport | [pure virtual]
GetBandwidthLimit() | RNReplicaNet::Transport | [virtual]
GetEnableLANDiscovery(void) | RNReplicaNet::Transport | [virtual]
GetMaximumInputBandwidth(void) | RNReplicaNet::Transport | [virtual]
GetMaximumOutputBandwidth(void) | RNReplicaNet::Transport | [virtual]
GetMaxPacketSize(void)=0 | RNReplicaNet::Transport | [pure virtual]
GetNextDiscovery(void)=0 | RNReplicaNet::Transport | [pure virtual]
GetPacketsLost(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPacketsReceived(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPacketsReceivedMerged(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPacketsReceivedSize(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPacketsSent(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPacketsSentMerged(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPacketsSentSize(const bool reset=false) | RNReplicaNet::Transport | [virtual]
GetPeerURL(void) | RNReplicaNet::Transport | [virtual]
GetStatus(void)=0 | RNReplicaNet::Transport | [pure virtual]
GetTransportClosed(void) | RNReplicaNet::Transport | [virtual]
HandleDiscovery(void)=0 | RNReplicaNet::Transport | [pure virtual]
HandleDiscoveryReply(const std::string reply)=0 | RNReplicaNet::Transport | [pure virtual]
kBandwidth_Connection enum value (defined in RNReplicaNet::Transport) | RNReplicaNet::Transport |
kBandwidth_Off enum value (defined in RNReplicaNet::Transport) | RNReplicaNet::Transport |
kTransport_ECANTLISTENONCHANNEL enum value | RNReplicaNet::Transport |
kTransport_EERROR enum value | RNReplicaNet::Transport |
kTransport_EOK enum value | RNReplicaNet::Transport |
kTransport_EWAITING enum value | RNReplicaNet::Transport |
Listen(const int channel=TransportAnyGameChannel)=0 | RNReplicaNet::Transport | [pure virtual]
Recv(char *const data, const int maxlen)=0 | RNReplicaNet::Transport | [pure virtual]
Send(const char *data, const int len)=0 | RNReplicaNet::Transport | [pure virtual]
SendCertain(const char *data, const int len)=0 | RNReplicaNet::Transport | [pure virtual]
SendReliable(const char *data, const int len)=0 | RNReplicaNet::Transport | [pure virtual]
SetBandwidthLimit(const Bandwidth enable=kBandwidth_Off) | RNReplicaNet::Transport | [virtual]
SetEnableLANDiscovery(const bool enable=true) | RNReplicaNet::Transport | [virtual]
SetMaximumInputBandwidth(const int bytesPerSecond=0) | RNReplicaNet::Transport | [virtual]
SetMaximumOutputBandwidth(const int bytesPerSecond=0) | RNReplicaNet::Transport | [virtual]
Transport() | RNReplicaNet::Transport |
~Transport() | RNReplicaNet::Transport | [virtual]

Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: Member List

RNReplicaNet::TransportConfig Member List

This is the complete list of members for RNReplicaNet::TransportConfig, including all inherited members.

GetPacketBufferEnable(void) | RNReplicaNet::TransportConfig | [static]
GetPacketBufferTime(void) | RNReplicaNet::TransportConfig | [static]
GetResendTimes(int *numberOfTimes, float *retryTimes) | RNReplicaNet::TransportConfig | [static]
PacketBufferBeginCaptureWindow(void) | RNReplicaNet::TransportConfig | [static]
PacketBufferEndCaptureWindow(const bool kickBuffer=true) | RNReplicaNet::TransportConfig | [static]
SetPacketBufferEnable(const bool enable=false) | RNReplicaNet::TransportConfig | [static]
SetPacketBufferTime(const float maxTime=0.0f) | RNReplicaNet::TransportConfig | [static]
SetResendTimes(const int numberOfTimes, const float *retryTimes) | RNReplicaNet::TransportConfig | [static]

Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: Member List

RNReplicaNet::XPURL Member List

This is the complete list of members for RNReplicaNet::XPURL, including all inherited members.

BeginEnumerateTransports(void) | RNReplicaNet::XPURL |
EnumerateTransports(void) | RNReplicaNet::XPURL |
FindTransport(const std::string url) | RNReplicaNet::XPURL | [static]
GetDebugHandler(void) | RNReplicaNet::XPURL | [static]
InitialiseNetwork(const bool hardware=false) | RNReplicaNet::XPURL | [static]
ParseURLs(const std::string urls) | RNReplicaNet::XPURL |
Poll(void) | RNReplicaNet::XPURL |
RegisterDebugHandler(DebugHandler *debugHandler=0) | RNReplicaNet::XPURL | [static]
RegisterDefaultTransports(void) | RNReplicaNet::XPURL | [static]
RegisterTransport(Transport &transport) | RNReplicaNet::XPURL | [static]
SetAutomaticPoll(void) | RNReplicaNet::XPURL |
SetManualPoll(void) | RNReplicaNet::XPURL |
ShutdownNetwork(const bool hardware=false) | RNReplicaNet::XPURL | [static]
XPURL() | RNReplicaNet::XPURL |
~XPURL() | RNReplicaNet::XPURL | [virtual]

Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: DebugHandler.h Source File

DebugHandler.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef _DEBUGHANDLER_H_
00012 #define _DEBUGHANDLER_H_
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 namespace RNReplicaNet
00016 {
00017
00047 class XPURLDLL_API DebugHandler
00048 {
00049 public:
00050     DebugHandler();
00051
00052     virtual ~DebugHandler();
00053
00057     virtual void DebugPrint(const char *);
00058
00064     virtual bool OutputToSocket(const char *text);
00065
00071     virtual bool EnableVisualDebuggerSocket(const int port = 8000);
00072
00077     virtual void DisableVisualDebuggerSocket(void);
00078
00083     virtual void Printf(const char *format, ...);
00084
00088     virtual void Poll(void);
00089
00094     virtual bool GotConnection(void) const;
00095
00100     virtual void CallbackConnectionError(const int error);
00101 };
00102
00103 } // namespace RNReplicaNet
00104
00105
00106 #endif
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1


XPURL: Class Members - Enumerations

  • ConnectionTypes : RNReplicaNet::NetworkEmulation
  • Error : RNReplicaNet::Transport


XPURL: Class Members - Enumeration values

  • kDSL512MB_Down128Up : RNReplicaNet::NetworkEmulation
  • kLAN : RNReplicaNet::NetworkEmulation
  • kModem28k : RNReplicaNet::NetworkEmulation
  • kModem56k : RNReplicaNet::NetworkEmulation
  • kPerfect : RNReplicaNet::NetworkEmulation
  • kTransport_ECANTLISTENONCHANNEL : RNReplicaNet::Transport
  • kTransport_EERROR : RNReplicaNet::Transport
  • kTransport_EOK : RNReplicaNet::Transport
  • kTransport_EWAITING : RNReplicaNet::Transport


XPURL: Class Members - Functions

- a -

  • Accept() : RNReplicaNet::Transport
  • Allocate() : RNReplicaNet::Transport

- b -

  • BeginDiscovery() : RNReplicaNet::Transport
  • BeginEnumerateTransports() : RNReplicaNet::XPURL

- c -

  • CallbackConnectionError() : RNReplicaNet::DebugHandler
  • CanAccept() : RNReplicaNet::Transport
  • CanRoute() : RNReplicaNet::Transport
  • Connect() : RNReplicaNet::Transport

- d -

  • DebugPrint() : RNReplicaNet::DebugHandler
  • DisableVisualDebuggerSocket() : RNReplicaNet::DebugHandler

- e -

  • EnableVisualDebuggerSocket() : RNReplicaNet::DebugHandler
  • EnumerateTransports() : RNReplicaNet::XPURL
  • ExportURL() : RNReplicaNet::Transport

- f -

  • FindTransport() : RNReplicaNet::XPURL

- g -

  • GetAverageLatency() : RNReplicaNet::NetworkEmulation
  • GetBandwidthLimit() : RNReplicaNet::Transport
  • GetDebugHandler() : RNReplicaNet::XPURL
  • GetEnabled() : RNReplicaNet::NetworkEmulation
  • GetEnableLANDiscovery() : RNReplicaNet::Transport
  • GetJitter() : RNReplicaNet::NetworkEmulation
  • GetMaximumInputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • GetMaximumOutputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • GetMaxPacketSize() : RNReplicaNet::Transport
  • GetNextDiscovery() : RNReplicaNet::Transport
  • GetPacketBufferEnable() : RNReplicaNet::TransportConfig
  • GetPacketBufferTime() : RNReplicaNet::TransportConfig
  • GetPacketLoss() : RNReplicaNet::NetworkEmulation
  • GetPacketsLost() : RNReplicaNet::Transport
  • GetPacketsReceived() : RNReplicaNet::Transport
  • GetPacketsReceivedMerged() : RNReplicaNet::Transport
  • GetPacketsReceivedSize() : RNReplicaNet::Transport
  • GetPacketsSent() : RNReplicaNet::Transport
  • GetPacketsSentMerged() : RNReplicaNet::Transport
  • GetPacketsSentSize() : RNReplicaNet::Transport
  • GetPeerURL() : RNReplicaNet::Transport
  • GetResendTimes() : RNReplicaNet::TransportConfig
  • GetStatus() : RNReplicaNet::Transport
  • GetTransportClosed() : RNReplicaNet::Transport
  • GotConnection() : RNReplicaNet::DebugHandler

- h -

  • HandleDiscovery() : RNReplicaNet::Transport
  • HandleDiscoveryReply() : RNReplicaNet::Transport

- i -

  • InitialiseNetwork() : RNReplicaNet::XPURL

- l -

  • Listen() : RNReplicaNet::Transport

- o -

  • OutputToSocket() : RNReplicaNet::DebugHandler

- p -

  • PacketBufferBeginCaptureWindow() : RNReplicaNet::TransportConfig
  • PacketBufferEndCaptureWindow() : RNReplicaNet::TransportConfig
  • ParseURLs() : RNReplicaNet::XPURL
  • Poll() : RNReplicaNet::XPURL, RNReplicaNet::DebugHandler
  • Printf() : RNReplicaNet::DebugHandler

- r -

  • Recv() : RNReplicaNet::Transport
  • RegisterDebugHandler() : RNReplicaNet::XPURL
  • RegisterDefaultTransports() : RNReplicaNet::XPURL
  • RegisterTransport() : RNReplicaNet::XPURL

- s -

  • Send() : RNReplicaNet::Transport
  • SendCertain() : RNReplicaNet::Transport
  • SendReliable() : RNReplicaNet::Transport
  • SetAutomaticPoll() : RNReplicaNet::XPURL
  • SetAverageLatency() : RNReplicaNet::NetworkEmulation
  • SetBandwidthLimit() : RNReplicaNet::Transport
  • SetConnection() : RNReplicaNet::NetworkEmulation
  • SetEnabled() : RNReplicaNet::NetworkEmulation
  • SetEnableLANDiscovery() : RNReplicaNet::Transport
  • SetJitter() : RNReplicaNet::NetworkEmulation
  • SetManualPoll() : RNReplicaNet::XPURL
  • SetMaximumInputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • SetMaximumOutputBandwidth() : RNReplicaNet::Transport, RNReplicaNet::NetworkEmulation
  • SetPacketBufferEnable() : RNReplicaNet::TransportConfig
  • SetPacketBufferTime() : RNReplicaNet::TransportConfig
  • SetPacketLoss() : RNReplicaNet::NetworkEmulation
  • SetResendTimes() : RNReplicaNet::TransportConfig
  • ShutdownNetwork() : RNReplicaNet::XPURL

- t -

  • Transport() : RNReplicaNet::Transport

- x -

  • XPURL() : RNReplicaNet::XPURL

- ~ -

  • ~Transport() : RNReplicaNet::Transport
  • ~XPURL() : RNReplicaNet::XPURL


XPURL: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled black box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
The arrows have the following meaning:
  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
Generated on Sun Oct 30 01:12:17 2005 for XPURL by doxygen 1.4.1


XPURL: NetworkEmulation.h Source File

NetworkEmulation.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __NETWORKEMULATION_H__
00012 #define __NETWORKEMULATION_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 namespace RNReplicaNet
00016 {
00017
00023 class XPURLDLL_API NetworkEmulation
00024 {
00025 public:
00026
00031     static void SetEnabled(const bool enable = false);
00032
00037     static bool GetEnabled(void);
00038
00042     enum ConnectionTypes
00043     {
00044         kPerfect = 0,
00045         kModem28k,
00046         kModem56k,
00047         kDSL512MB_Down128Up,
00048         kLAN
00049     };
00050
00056     static void SetConnection(const ConnectionTypes type = kPerfect,const bool enable = true);
00057
00062     static void SetPacketLoss(const float percent = 0);
00063
00068     static float GetPacketLoss(void);
00069
00074     static void SetMaximumOutputBandwidth(const int bytesPerSecond = 0);
00075
00080     static int GetMaximumOutputBandwidth(void);
00081
00086     static void SetMaximumInputBandwidth(const int bytesPerSecond = 0);
00087
00092     static int GetMaximumInputBandwidth(void);
00093
00098     static void SetAverageLatency(const float milliSeconds = 0.0f);
00099
00104     static float GetAverageLatency(void);
00105
00110     static void SetJitter(const float milliSeconds = 0.0f);
00111
00116     static float GetJitter(void);
00117
00118 private:
00119     NetworkEmulation() {};
00120     virtual ~NetworkEmulation() {};
00121 };
00122
00123 } // namespace RNReplicaNet
00124
00125 #endif
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1


XPURL: Transport.h Source File

Transport.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __TRANSPORT_H__
00012 #define __TRANSPORT_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #include <string>
00016
00017 namespace RNReplicaNet
00018 {
00019
00020 const int TransportAnyGameChannel = 0;
00021 const int TransportMinimumPacketSize = 512;
00022
00035 class XPURLDLL_API Transport
00036 {
00037 public:
00038
00042     enum Error
00043     {
00044         kTransport_EOK = 0,
00045         kTransport_EERROR = -1,
00046         kTransport_ECANTLISTENONCHANNEL = -2,
00047         kTransport_EWAITING = -3
00048     };
00049
00050     enum Bandwidth
00051     {
00052         kBandwidth_Off = 0,
00053         kBandwidth_Connection = 1
00054     };
00055
00059     Transport();
00060
00064     virtual ~Transport();
00065
00066     /* These virtual functions have a base implementation but can also be replaced by a new transport if needed */
00067
00073     virtual int GetPacketsSent(const bool reset = false);
00074
00080     virtual int GetPacketsSentMerged(const bool reset = false);
00081
00087     virtual int GetPacketsSentSize(const bool reset = false);
00088
00094     virtual int GetPacketsReceived(const bool reset = false);
00095
00101     virtual int GetPacketsReceivedMerged(const bool reset = false);
00102
00108     virtual int GetPacketsReceivedSize(const bool reset = false);
00109
00115     virtual int GetPacketsLost(const bool reset = false);
00116
00123     virtual void SetBandwidthLimit(const Bandwidth enable = kBandwidth_Off);
00124
00129     virtual Bandwidth GetBandwidthLimit();
00130
00135     virtual void SetMaximumOutputBandwidth(const int bytesPerSecond = 0);
00136
00141     virtual int GetMaximumOutputBandwidth(void);
00142
00147     virtual void SetMaximumInputBandwidth(const int bytesPerSecond = 0);
00148
00153     virtual int GetMaximumInputBandwidth(void);
00154
00159     virtual std::string GetPeerURL(void);
00160
00165     virtual bool GetTransportClosed(void);
00166
00171     virtual void SetEnableLANDiscovery(const bool enable = true);
00172
00177     virtual bool GetEnableLANDiscovery(void);
00178
00179     /* These pure virtual functions are the minimum feature set the transport has to support */
00180
00186     virtual std::string CanAccept(void) = 0;
00187
00193     virtual std::string CanRoute(void) = 0;
00194
00199     virtual std::string ExportURL(void) = 0;
00200
00205     virtual Transport *Allocate(void) = 0;
00206
00212     virtual Error Listen(const int channel = TransportAnyGameChannel) = 0;
00213
00219     virtual Error Connect(const std::string address) = 0;
00220
00225     virtual Transport *Accept(void) = 0;
00226
00234     virtual Error Send(const char *data,const int len) = 0;
00235
00243     virtual Error SendReliable(const char *data,const int len) = 0;
00244
00252     virtual Error SendCertain(const char *data,const int len) = 0;
00253
00260     virtual int Recv(char *const data,const int maxlen) = 0;
00261
00266     virtual int GetMaxPacketSize(void) = 0;
00267
00272     virtual std::string HandleDiscovery(void) = 0;
00273
00278     virtual void HandleDiscoveryReply(const std::string reply) = 0;
00279
00283     virtual void BeginDiscovery(void) = 0;
00284
00289     virtual std::string GetNextDiscovery(void) = 0;
00290
00295     virtual Error GetStatus(void) = 0;
00296
00297 private:
00298 };
00299
00300 } // namespace RNReplicaNet
00301
00302 #endif
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1


XPURL: TransportConfig.h Source File

TransportConfig.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef _TRANSPORTCONFIG_H_
00012 #define _TRANSPORTCONFIG_H_
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 namespace RNReplicaNet
00016 {
00017
00022 class XPURLDLL_API TransportConfig
00023 {
00024 public:
00031     static void SetResendTimes(const int numberOfTimes,const float *retryTimes);
00032
00038     static void GetResendTimes(int *numberOfTimes,float *retryTimes);
00039
00050     static void SetPacketBufferTime(const float maxTime = 0.0f);
00051
00056     static float GetPacketBufferTime(void);
00057
00064     static void PacketBufferBeginCaptureWindow(void);
00065
00070     static void PacketBufferEndCaptureWindow(const bool kickBuffer = true);
00071
00079     static void SetPacketBufferEnable(const bool enable = false);
00080
00085     static bool GetPacketBufferEnable(void);
00086
00087 private:
00088     TransportConfig() {};
00089 };
00090
00091 } // namespace RNReplicaNet
00092
00093 #endif
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1


XPURL: XPURL.h Source File

XPURL.h

00001 /* START_LICENSE_HEADER
00002
00003 Copyright (C) 2000 Martin Piper, original design and program code
00004 Copyright (C) 2001-2005 Replica Software
00005
00006 This program file is copyright (C) Replica Software and can only be used under license.
00007 For more information visit: http://www.replicanet.com/
00008 Or email: info@replicanet.com
00009
00010 END_LICENSE_HEADER */
00011 #ifndef __XPURL_H__
00012 #define __XPURL_H__
00013 #include "RNPlatform/Inc/DLLExportAPI.h"
00014
00015 #define _XPURL_VERSION 5200
00016 // All DLL versions with the same major version are compatible
00017 #define _XPURL_DLLVERSIONMAJOR 8
00018 #define _XPURL_DLLVERSIONMINOR 0
00019
00020 #include "RNXPURL/Inc/Transport.h"
00021 #include <vector>
00022
00023 namespace RNReplicaNet
00024 {
00025
00026 class DebugHandler;
00027 struct URLBlock;
00028
00032 class XPURLDLL_API XPURL
00033 {
00034 public:
00038     XPURL();
00039
00044     virtual ~XPURL();
00045
00050     static void RegisterTransport(Transport &transport);
00051
00055     static void RegisterDefaultTransports(void);
00056
00060     void BeginEnumerateTransports(void);
00061
00067     Transport *EnumerateTransports(void);
00068
00073     std::string ParseURLs(const std::string urls);
00074
00079     static Transport *FindTransport(const std::string url);
00080
00088     void Poll(void);
00089
00096     void SetManualPoll(void);
00097
00105     void SetAutomaticPoll(void);
00106
00112     static void InitialiseNetwork(const bool hardware = false);
00113
00121     static void ShutdownNetwork(const bool hardware = false);
00122
00123
00130     static DebugHandler *RegisterDebugHandler(DebugHandler *debugHandler = 0);
00131
00136     static DebugHandler *GetDebugHandler(void);
00137
00138 private:
00139
00140     std::vector<URLBlock *>::iterator mst,men;
00141
00142     std::string mParseState;
00143 };
00144
00145 } // namespace RNReplicaNet
00146
00147 #endif
Generated on Sun Oct 30 01:12:16 2005 for XPURL by doxygen 1.4.1