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

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:
Generated on Sun Oct 30 01:12:17 2005 for XPURL by  doxygen 1.4.1