Shadowrun: Awakened 29 September 2011 - Build 871
Classes | Public Member Functions | Private Member Functions | Private Attributes
RakNet::ReliabilityLayer Class Reference

Datagram reliable, ordered, unordered and sequenced sends. Flow control. Message splitting, reassembly, and coalescence.

#include <ReliabilityLayer.h>

List of all members.

Classes

struct  DatagramHistoryNode
struct  MessageNumberNode

Public Member Functions

bool AckTimeout (RakNet::Time curTime)
 Has a lot of time passed since the last ack.
void ApplyNetworkSimulator (double _maxSendBPS, RakNet::TimeMS _minExtraPing, RakNet::TimeMS _extraPingVariance)
bool AreAcksWaiting (void)
CCTimeType GetNextSendTime (void) const
RakNetStatisticsGetStatistics (RakNetStatistics *rns)
CCTimeType GetTimeBetweenPackets (void) const
RakNet::TimeMS GetTimeLastDatagramArrived (void) const
RakNet::TimeMS GetTimeoutTime (void)
bool HandleSocketReceiveFromConnectedPlayer (const char *buffer, unsigned int length, SystemAddress &systemAddress, DataStructures::List< PluginInterface2 * > &messageHandlerList, int MTUSize, SOCKET s, RakNetRandom *rnr, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions, CCTimeType timeRead)
bool IsDeadConnection (void) const
bool IsNetworkSimulatorActive (void)
bool IsOutgoingDataWaiting (void)
 Are we waiting for any data to be sent out or be processed by the player?
void KillConnection (void)
 Causes IsDeadConnection to return true.
BitSize_t Receive (unsigned char **data)
 ReliabilityLayer ()
void Reset (bool resetVariables, int MTUSize, bool _useSecurity)
 Resets the layer for reuse.
bool Send (char *data, BitSize_t numberOfBitsToSend, PacketPriority priority, PacketReliability reliability, unsigned char orderingChannel, bool makeDataCopy, int MTUSize, CCTimeType currentTime, uint32_t receipt)
void SetSplitMessageProgressInterval (int interval)
void SetTimeoutTime (RakNet::TimeMS time)
void SetUnreliableTimeout (RakNet::TimeMS timeoutMS)
void Update (SOCKET s, SystemAddress &systemAddress, int MTUSize, CCTimeType time, unsigned bitsPerSecondLimit, DataStructures::List< PluginInterface2 * > &messageHandlerList, RakNetRandom *rnr, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions)
 ~ReliabilityLayer ()

Private Member Functions

void AddFirstToDatagramHistory (DatagramSequenceNumberType datagramNumber, CCTimeType timeSent)
MessageNumberNodeAddFirstToDatagramHistory (DatagramSequenceNumberType datagramNumber, DatagramSequenceNumberType messageNumber, CCTimeType timeSent)
MessageNumberNodeAddSubsequentToDatagramHistory (MessageNumberNode *messageNumberNode, DatagramSequenceNumberType messageNumber)
void AddToListTail (InternalPacket *internalPacket, bool modifyUnacknowledgedBytes)
void AddToUnreliableLinkedList (InternalPacket *internalPacket)
InternalPacketAllocateFromInternalPacketPool (void)
void AllocInternalPacketData (InternalPacket *internalPacket, InternalPacketRefCountedData **refCounter, unsigned char *externallyAllocatedPtr, unsigned char *ourOffset)
void AllocInternalPacketData (InternalPacket *internalPacket, unsigned char *externallyAllocatedPtr)
void AllocInternalPacketData (InternalPacket *internalPacket, unsigned int numBytes, bool allowStack, const char *file, unsigned int line)
InternalPacketBuildPacketFromSplitPacketList (SplitPacketIdType splitPacketId, CCTimeType time, SOCKET s, SystemAddress &systemAddress, RakNetRandom *rnr, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions)
 Take all split chunks with the specified splitPacketId and try to reconstruct a packet. If we can, allocate and return it. Otherwise return 0.
InternalPacketBuildPacketFromSplitPacketList (SplitPacketChannel *splitPacketChannel, CCTimeType time)
void CalculateHistogramAckSize (void)
bool CheckSHA1 (char code[20], unsigned char *const buffer, unsigned int nbytes)
 Check the SHA1 code.
void ClearPacketsAndDatagrams (bool releaseToInternalPacketPoolIfNeedsAck)
InternalPacketCreateInternalPacketCopy (InternalPacket *original, int dataByteOffset, int dataByteLength, CCTimeType time)
 Delete any unreliable split packets that have long since expired.
InternalPacketCreateInternalPacketFromBitStream (RakNet::BitStream *bitStream, CCTimeType time)
 Parse a bitstream and create an internal packet to represent this data.
void DeleteSequencedPacketsInList (unsigned char orderingChannel, DataStructures::List< InternalPacket * > &theList, int splitPacketId=-1)
 Search the specified list for sequenced packets on the specified ordering channel, optionally skipping those with splitPacketId, and delete them.
void DeleteSequencedPacketsInList (unsigned char orderingChannel, DataStructures::Queue< InternalPacket * > &theList)
 Search the specified list for sequenced packets with a value less than orderingIndex and delete them.
void FreeInternalPacketData (InternalPacket *internalPacket, const char *file, unsigned int line)
void FreeMemory (bool freeAllImmediately)
 Memory handling.
void FreeThreadSafeMemory (void)
 Memory handling.
BitSize_t GetMaxDatagramSizeExcludingMessageHeaderBits (void)
unsigned int GetMaxDatagramSizeExcludingMessageHeaderBytes (void)
BitSize_t GetMaxMessageHeaderLengthBits (void)
 Parse an internalPacket and figure out how many header bits would be written. Returns that number.
BitSize_t GetMessageHeaderLengthBits (const InternalPacket *const internalPacket)
MessageNumberNodeGetMessageNumberNodeByDatagramIndex (DatagramSequenceNumberType index, CCTimeType *timeSent)
reliabilityHeapWeightType GetNextWeight (int priorityLevel)
unsigned int GetResendListDataSize (void) const
 Does this packet number represent a packet that was skipped (out of order?)
void GetSHA1 (unsigned char *const buffer, unsigned int nbytes, char code[20])
 Get the SHA1 code.
void InitHeapWeights (void)
void InitializeVariables (void)
void InsertIntoSplitPacketList (InternalPacket *internalPacket, CCTimeType time)
 Insert a packet into the split packet list.
void InsertPacketIntoResendList (InternalPacket *internalPacket, CCTimeType time, bool firstResend, bool modifyUnacknowledgedBytes)
 Get the specified ordering list.
bool IsExpiredTime (unsigned int input, CCTimeType currentTime) const
 Given the current time, is this time so old that we should consider it a timeout?
bool IsOlderOrderedPacket (OrderingIndexType newPacketOrderingIndex, OrderingIndexType waitingForPacketOrderingIndex)
 Returns true if newPacketOrderingIndex is older than the waitingForPacketOrderingIndex.
bool IsResendQueueEmpty (void) const
bool IsSendThrottled (int MTUSize)
 This will return true if we should not send at this time.
void MoveToListHead (InternalPacket *internalPacket)
void PopListHead (bool modifyUnacknowledgedBytes)
void PushDatagram (void)
void PushPacket (CCTimeType time, InternalPacket *internalPacket, bool isReliable)
void ReleaseToInternalPacketPool (InternalPacket *ip)
void RemoveFromDatagramHistory (DatagramSequenceNumberType index)
void RemoveFromList (InternalPacket *internalPacket, bool modifyUnacknowledgedBytes)
void RemoveFromUnreliableLinkedList (InternalPacket *internalPacket)
unsigned RemovePacketFromResendListAndDeleteOlderReliableSequenced (const MessageNumberType messageNumber, CCTimeType time, DataStructures::List< PluginInterface2 * > &messageHandlerList, const SystemAddress &systemAddress)
 Does what the function name says.
bool ResendBufferOverflow (void) const
void ResetPacketsAndDatagrams (void)
void SendAcknowledgementPacket (const DatagramSequenceNumberType messageNumber, CCTimeType time)
 Acknowledge receipt of the packet with the specified messageNumber.
void SendACKs (SOCKET s, SystemAddress &systemAddress, CCTimeType time, RakNetRandom *rnr, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions)
void SendBitStream (SOCKET s, SystemAddress &systemAddress, RakNet::BitStream *bitStream, RakNetRandom *rnr, unsigned short remotePortRakNetWasStartedOn_PS3, unsigned int extraSocketOptions, CCTimeType currentTime)
void SortSplitPacketList (DataStructures::List< InternalPacket * > &data, unsigned int leftEdge, unsigned int rightEdge) const
void SplitPacket (InternalPacket *internalPacket)
 Split the passed packet into chunks under MTU_SIZE bytes (including headers) and save those new chunks.
bool TagMostRecentPushAsSecondOfPacketPair (void)
void UpdateNextActionTime (void)
void UpdateThreadedMemory (void)
 Update all memory which is not threadsafe.
void UpdateWindowFromAck (CCTimeType time)
 Increase the window size.
void UpdateWindowFromPacketloss (CCTimeType time)
 We lost a packet.
void ValidateResendList (void) const
BitSize_t WriteToBitStreamFromInternalPacket (RakNet::BitStream *bitStream, const InternalPacket *const internalPacket, CCTimeType curTime)

Private Attributes

DataStructures::RangeList
< DatagramSequenceNumberType > 
acknowlegements
unsigned char ackPingIndex
CCTimeType ackPingSum
BitSize_t allDatagramSizesSoFar
bool bandwidthExceededStatistic
BPSTracker bpsMetrics [RNS_PER_SECOND_METRICS_COUNT]
bool cheater
RakNet::CCRakNetSlidingWindow congestionManager
int countdownToNextPacketPair
DataStructures::Queue
< DatagramHistoryNode
datagramHistory
DataStructures::MemoryPool
< MessageNumberNode
datagramHistoryMessagePool
DatagramSequenceNumberType datagramHistoryPopCount
DataStructures::List< unsigned
int > 
datagramSizesInBytes
BitSize_t datagramSizeSoFar
DataStructures::List< booldatagramsToSendThisUpdateIsPair
bool deadConnection
CCTimeType elapsedTimeSinceLastUpdate
DataStructures::Queue< boolhasReceivedPacketQueue
OrderingIndexType heapIndexOffsets [32]
OrderingIndexType highestSequencedReadIndex [32]
DataStructures::RangeList
< DatagramSequenceNumberType > 
incomingAcks
MessageNumberType internalOrderIndex
DataStructures::MemoryPool
< InternalPacket
internalPacketPool
CCTimeType lastBpsClear
CCTimeType lastUpdateTime
DataStructures::RangeList
< DatagramSequenceNumberType > 
NAKs
CCTimeType nextAckTimeToSend
CCTimeType nextAllowedThroughputSample
CCTimeType nextSendTime
OrderingIndexType orderedReadIndex [32]
OrderingIndexType orderedWriteIndex [32]
DataStructures::Heap
< reliabilityHeapWeightType,
InternalPacket *, false > 
orderingHeaps [32]
DataStructures::Heap
< reliabilityHeapWeightType,
InternalPacket *, false > 
outgoingPacketBuffer
reliabilityHeapWeightType outgoingPacketBufferNextWeights [NUMBER_OF_PRIORITIES]
DataStructures::Queue
< InternalPacket * > 
outputQueue
DataStructures::List< boolpacketsToDeallocThisUpdate
DataStructures::List
< InternalPacket * > 
packetsToSendThisUpdate
DataStructures::List< unsigned
int > 
packetsToSendThisUpdateDatagramBoundaries
DatagramSequenceNumberType receivedPacketsBaseIndex
unsigned receivePacketCount
DataStructures::MemoryPool
< InternalPacketRefCountedData
refCountedDataPool
bool remoteSystemNeedsBAndAS
RemoteSystemTimeType remoteSystemTime
InternalPacketresendBuffer [512]
InternalPacketresendLinkedListHead
bool resetReceivedPackets
MessageNumberType sendReliableMessageNumberIndex
OrderingIndexType sequencedWriteIndex [32]
int splitMessageProgressInterval
DataStructures::OrderedList
< SplitPacketIdType,
SplitPacketChannel
*, SplitPacketChannelComp > 
splitPacketChannelList
SplitPacketIdType splitPacketId
RakNetStatistics statistics
long long throughputCapCountdown
CCTimeType timeBetweenPackets
RakNet::TimeMS timeLastDatagramArrived
CCTimeType timeOfLastContinualSend
RakNet::TimeMS timeoutTime
CCTimeType timeToNextUnreliableCull
double totalUserDataBytesAcked
uint32_t unacknowledgedBytes
InternalPacketunreliableLinkedListHead
CCTimeType unreliableTimeout
RakNet::BitStream updateBitStream

Detailed Description

Definition at line 119 of file ReliabilityLayer.h.


Constructor & Destructor Documentation

RakNet::ReliabilityLayer::ReliabilityLayer ( )
RakNet::ReliabilityLayer::~ReliabilityLayer ( )

Member Function Documentation

bool RakNet::ReliabilityLayer::AckTimeout ( RakNet::Time  curTime)
void RakNet::ReliabilityLayer::AddFirstToDatagramHistory ( DatagramSequenceNumberType  datagramNumber,
CCTimeType  timeSent 
) [private]
MessageNumberNode* RakNet::ReliabilityLayer::AddFirstToDatagramHistory ( DatagramSequenceNumberType  datagramNumber,
DatagramSequenceNumberType  messageNumber,
CCTimeType  timeSent 
) [private]
MessageNumberNode* RakNet::ReliabilityLayer::AddSubsequentToDatagramHistory ( MessageNumberNode messageNumberNode,
DatagramSequenceNumberType  messageNumber 
) [private]
void RakNet::ReliabilityLayer::AddToListTail ( InternalPacket internalPacket,
bool  modifyUnacknowledgedBytes 
) [private]
void RakNet::ReliabilityLayer::AddToUnreliableLinkedList ( InternalPacket internalPacket) [private]
InternalPacket* RakNet::ReliabilityLayer::AllocateFromInternalPacketPool ( void  ) [private]
void RakNet::ReliabilityLayer::AllocInternalPacketData ( InternalPacket internalPacket,
InternalPacketRefCountedData **  refCounter,
unsigned char *  externallyAllocatedPtr,
unsigned char *  ourOffset 
) [private]
void RakNet::ReliabilityLayer::AllocInternalPacketData ( InternalPacket internalPacket,
unsigned char *  externallyAllocatedPtr 
) [private]
void RakNet::ReliabilityLayer::AllocInternalPacketData ( InternalPacket internalPacket,
unsigned int  numBytes,
bool  allowStack,
const char *  file,
unsigned int  line 
) [private]
void RakNet::ReliabilityLayer::ApplyNetworkSimulator ( double  _maxSendBPS,
RakNet::TimeMS  _minExtraPing,
RakNet::TimeMS  _extraPingVariance 
)
bool RakNet::ReliabilityLayer::AreAcksWaiting ( void  )
InternalPacket* RakNet::ReliabilityLayer::BuildPacketFromSplitPacketList ( SplitPacketIdType  splitPacketId,
CCTimeType  time,
SOCKET  s,
SystemAddress systemAddress,
RakNetRandom rnr,
unsigned short  remotePortRakNetWasStartedOn_PS3,
unsigned int  extraSocketOptions 
) [private]
InternalPacket* RakNet::ReliabilityLayer::BuildPacketFromSplitPacketList ( SplitPacketChannel splitPacketChannel,
CCTimeType  time 
) [private]
void RakNet::ReliabilityLayer::CalculateHistogramAckSize ( void  ) [private]
bool RakNet::ReliabilityLayer::CheckSHA1 ( char  code[20],
unsigned char *const  buffer,
unsigned int  nbytes 
) [private]
void RakNet::ReliabilityLayer::ClearPacketsAndDatagrams ( bool  releaseToInternalPacketPoolIfNeedsAck) [private]
InternalPacket* RakNet::ReliabilityLayer::CreateInternalPacketCopy ( InternalPacket original,
int  dataByteOffset,
int  dataByteLength,
CCTimeType  time 
) [private]

Creates a copy of the specified internal packet with data copied from the original starting at dataByteOffset for dataByteLength bytes. Does not copy any split data parameters as that information is always generated does not have any reason to be copied

InternalPacket* RakNet::ReliabilityLayer::CreateInternalPacketFromBitStream ( RakNet::BitStream bitStream,
CCTimeType  time 
) [private]
void RakNet::ReliabilityLayer::DeleteSequencedPacketsInList ( unsigned char  orderingChannel,
DataStructures::List< InternalPacket * > &  theList,
int  splitPacketId = -1 
) [private]
void RakNet::ReliabilityLayer::DeleteSequencedPacketsInList ( unsigned char  orderingChannel,
DataStructures::Queue< InternalPacket * > &  theList 
) [private]
void RakNet::ReliabilityLayer::FreeInternalPacketData ( InternalPacket internalPacket,
const char *  file,
unsigned int  line 
) [private]
void RakNet::ReliabilityLayer::FreeMemory ( bool  freeAllImmediately) [private]
void RakNet::ReliabilityLayer::FreeThreadSafeMemory ( void  ) [private]
BitSize_t RakNet::ReliabilityLayer::GetMaxDatagramSizeExcludingMessageHeaderBits ( void  ) [private]
unsigned int RakNet::ReliabilityLayer::GetMaxDatagramSizeExcludingMessageHeaderBytes ( void  ) [private]
BitSize_t RakNet::ReliabilityLayer::GetMaxMessageHeaderLengthBits ( void  ) [private]
BitSize_t RakNet::ReliabilityLayer::GetMessageHeaderLengthBits ( const InternalPacket *const  internalPacket) [private]
MessageNumberNode* RakNet::ReliabilityLayer::GetMessageNumberNodeByDatagramIndex ( DatagramSequenceNumberType  index,
CCTimeType *  timeSent 
) [private]
CCTimeType RakNet::ReliabilityLayer::GetNextSendTime ( void  ) const
reliabilityHeapWeightType RakNet::ReliabilityLayer::GetNextWeight ( int  priorityLevel) [private]
unsigned int RakNet::ReliabilityLayer::GetResendListDataSize ( void  ) const [private]

Skip an element in the received packets list How many elements are waiting to be resent?

void RakNet::ReliabilityLayer::GetSHA1 ( unsigned char *const  buffer,
unsigned int  nbytes,
char  code[20] 
) [private]
RakNetStatistics* RakNet::ReliabilityLayer::GetStatistics ( RakNetStatistics rns)

Get Statistics

Returns:
A pointer to a static struct, filled out with current statistical information.
CCTimeType RakNet::ReliabilityLayer::GetTimeBetweenPackets ( void  ) const
RakNet::TimeMS RakNet::ReliabilityLayer::GetTimeLastDatagramArrived ( void  ) const [inline]

Definition at line 215 of file ReliabilityLayer.h.

References timeLastDatagramArrived.

RakNet::TimeMS RakNet::ReliabilityLayer::GetTimeoutTime ( void  )

Returns the value passed to SetTimeoutTime. or the default if it was never called

Parameters:
[out]thevalue passed to SetTimeoutTime
bool RakNet::ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer ( const char *  buffer,
unsigned int  length,
SystemAddress systemAddress,
DataStructures::List< PluginInterface2 * > &  messageHandlerList,
int  MTUSize,
SOCKET  s,
RakNetRandom rnr,
unsigned short  remotePortRakNetWasStartedOn_PS3,
unsigned int  extraSocketOptions,
CCTimeType  timeRead 
)

Packets are read directly from the socket layer and skip the reliability layer because unconnected players do not use the reliability layer This function takes packet data after a player has been confirmed as connected.

Parameters:
[in]bufferThe socket data
[in]lengthThe length of the socket data
[in]systemAddressThe player that this data is from
[in]messageHandlerListA list of registered plugins
[in]MTUSizemaximum datagram size
Return values:
trueSuccess
falseModified packet
void RakNet::ReliabilityLayer::InitHeapWeights ( void  ) [private]
void RakNet::ReliabilityLayer::InitializeVariables ( void  ) [private]
void RakNet::ReliabilityLayer::InsertIntoSplitPacketList ( InternalPacket internalPacket,
CCTimeType  time 
) [private]
void RakNet::ReliabilityLayer::InsertPacketIntoResendList ( InternalPacket internalPacket,
CCTimeType  time,
bool  firstResend,
bool  modifyUnacknowledgedBytes 
) [private]

Add the internal packet to the ordering list in order based on order index Inserts a packet into the resend list in order

bool RakNet::ReliabilityLayer::IsDeadConnection ( void  ) const

Were you ever unable to deliver a packet despite retries?

Returns:
true means the connection has been lost. Otherwise not.
bool RakNet::ReliabilityLayer::IsExpiredTime ( unsigned int  input,
CCTimeType  currentTime 
) const [private]
bool RakNet::ReliabilityLayer::IsNetworkSimulatorActive ( void  )

Returns if you previously called ApplyNetworkSimulator

Returns:
If you previously called ApplyNetworkSimulator
bool RakNet::ReliabilityLayer::IsOlderOrderedPacket ( OrderingIndexType  newPacketOrderingIndex,
OrderingIndexType  waitingForPacketOrderingIndex 
) [private]
bool RakNet::ReliabilityLayer::IsOutgoingDataWaiting ( void  )
bool RakNet::ReliabilityLayer::IsResendQueueEmpty ( void  ) const [private]
bool RakNet::ReliabilityLayer::IsSendThrottled ( int  MTUSize) [private]
void RakNet::ReliabilityLayer::KillConnection ( void  )
void RakNet::ReliabilityLayer::MoveToListHead ( InternalPacket internalPacket) [private]
void RakNet::ReliabilityLayer::PopListHead ( bool  modifyUnacknowledgedBytes) [private]
void RakNet::ReliabilityLayer::PushDatagram ( void  ) [private]
void RakNet::ReliabilityLayer::PushPacket ( CCTimeType  time,
InternalPacket internalPacket,
bool  isReliable 
) [private]
BitSize_t RakNet::ReliabilityLayer::Receive ( unsigned char **  data)

This allocates bytes and writes a user-level message to those bytes.

Parameters:
[out]dataThe message
Returns:
Returns number of BITS put into the buffer
void RakNet::ReliabilityLayer::ReleaseToInternalPacketPool ( InternalPacket ip) [private]
void RakNet::ReliabilityLayer::RemoveFromDatagramHistory ( DatagramSequenceNumberType  index) [private]
void RakNet::ReliabilityLayer::RemoveFromList ( InternalPacket internalPacket,
bool  modifyUnacknowledgedBytes 
) [private]
void RakNet::ReliabilityLayer::RemoveFromUnreliableLinkedList ( InternalPacket internalPacket) [private]
unsigned RakNet::ReliabilityLayer::RemovePacketFromResendListAndDeleteOlderReliableSequenced ( const MessageNumberType  messageNumber,
CCTimeType  time,
DataStructures::List< PluginInterface2 * > &  messageHandlerList,
const SystemAddress systemAddress 
) [private]
bool RakNet::ReliabilityLayer::ResendBufferOverflow ( void  ) const [private]
void RakNet::ReliabilityLayer::Reset ( bool  resetVariables,
int  MTUSize,
bool  _useSecurity 
)
void RakNet::ReliabilityLayer::ResetPacketsAndDatagrams ( void  ) [private]
bool RakNet::ReliabilityLayer::Send ( char *  data,
BitSize_t  numberOfBitsToSend,
PacketPriority  priority,
PacketReliability  reliability,
unsigned char  orderingChannel,
bool  makeDataCopy,
int  MTUSize,
CCTimeType  currentTime,
uint32_t  receipt 
)

Puts data on the send queue

Parameters:
[in]dataThe data to send
[in]numberOfBitsToSendThe length of data in bits
[in]priorityThe priority level for the send
[in]reliabilityThe reliability type for the send
[in]orderingChannel0 to 31. Specifies what channel to use, for relational ordering and sequencing of packets.
[in]makeDataCopyIf true data will be copied. Otherwise, only a pointer will be stored.
[in]MTUSizemaximum datagram size
[in]currentTimeCurrent time, as per RakNet::GetTimeMS()
[in]receiptThis number will be returned back with ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS and is only returned with the reliability types that contain RECEIPT in the name
Returns:
True or false for success or failure.
void RakNet::ReliabilityLayer::SendAcknowledgementPacket ( const DatagramSequenceNumberType  messageNumber,
CCTimeType  time 
) [private]
void RakNet::ReliabilityLayer::SendACKs ( SOCKET  s,
SystemAddress systemAddress,
CCTimeType  time,
RakNetRandom rnr,
unsigned short  remotePortRakNetWasStartedOn_PS3,
unsigned int  extraSocketOptions 
) [private]
void RakNet::ReliabilityLayer::SendBitStream ( SOCKET  s,
SystemAddress systemAddress,
RakNet::BitStream bitStream,
RakNetRandom rnr,
unsigned short  remotePortRakNetWasStartedOn_PS3,
unsigned int  extraSocketOptions,
CCTimeType  currentTime 
) [private]

Send the contents of a bitstream to the socket

Parameters:
[in]sThe socket used for sending data
[in]systemAddressThe address and port to send to
[in]bitStreamThe data to send.
void RakNet::ReliabilityLayer::SetSplitMessageProgressInterval ( int  interval)
void RakNet::ReliabilityLayer::SetTimeoutTime ( RakNet::TimeMS  time)

Set the time, in MS, to use before considering ourselves disconnected after not being able to deliver a reliable packet Default time is 10,000 or 10 seconds in release and 30,000 or 30 seconds in debug.

Parameters:
[in]timeTime, in MS
void RakNet::ReliabilityLayer::SetUnreliableTimeout ( RakNet::TimeMS  timeoutMS)
void RakNet::ReliabilityLayer::SortSplitPacketList ( DataStructures::List< InternalPacket * > &  data,
unsigned int  leftEdge,
unsigned int  rightEdge 
) const [private]
void RakNet::ReliabilityLayer::SplitPacket ( InternalPacket internalPacket) [private]
bool RakNet::ReliabilityLayer::TagMostRecentPushAsSecondOfPacketPair ( void  ) [private]
void RakNet::ReliabilityLayer::Update ( SOCKET  s,
SystemAddress systemAddress,
int  MTUSize,
CCTimeType  time,
unsigned  bitsPerSecondLimit,
DataStructures::List< PluginInterface2 * > &  messageHandlerList,
RakNetRandom rnr,
unsigned short  remotePortRakNetWasStartedOn_PS3,
unsigned int  extraSocketOptions 
)

Call once per game cycle. Handles internal lists and actually does the send.

Parameters:
[in]sthe communication end point
[in]systemAddressThe Unique Player Identifier who shouldhave sent some packets
[in]MTUSizemaximum datagram size
[in]timecurrent system time
[in]maxBitsPerSecondif non-zero, enforces that outgoing bandwidth does not exceed this amount
[in]messageHandlerListA list of registered plugins
void RakNet::ReliabilityLayer::UpdateNextActionTime ( void  ) [private]
void RakNet::ReliabilityLayer::UpdateThreadedMemory ( void  ) [private]
void RakNet::ReliabilityLayer::UpdateWindowFromAck ( CCTimeType  time) [private]
void RakNet::ReliabilityLayer::UpdateWindowFromPacketloss ( CCTimeType  time) [private]
void RakNet::ReliabilityLayer::ValidateResendList ( void  ) const [private]
BitSize_t RakNet::ReliabilityLayer::WriteToBitStreamFromInternalPacket ( RakNet::BitStream bitStream,
const InternalPacket *const  internalPacket,
CCTimeType  curTime 
) [private]

Parse an internalPacket and create a bitstream to represent this data

Returns:
Returns number of bits used

Member Data Documentation

Definition at line 556 of file ReliabilityLayer.h.

unsigned char RakNet::ReliabilityLayer::ackPingIndex [private]

Definition at line 473 of file ReliabilityLayer.h.

Definition at line 472 of file ReliabilityLayer.h.

Definition at line 543 of file ReliabilityLayer.h.

Definition at line 481 of file ReliabilityLayer.h.

BPSTracker RakNet::ReliabilityLayer::bpsMetrics[RNS_PER_SECOND_METRICS_COUNT] [private]

Definition at line 572 of file ReliabilityLayer.h.

Definition at line 406 of file ReliabilityLayer.h.

RakNet::CCRakNetSlidingWindow RakNet::ReliabilityLayer::congestionManager [private]

Definition at line 513 of file ReliabilityLayer.h.

Definition at line 552 of file ReliabilityLayer.h.

Definition at line 354 of file ReliabilityLayer.h.

Definition at line 355 of file ReliabilityLayer.h.

DatagramSequenceNumberType RakNet::ReliabilityLayer::datagramHistoryPopCount [private]

Definition at line 363 of file ReliabilityLayer.h.

Definition at line 541 of file ReliabilityLayer.h.

Definition at line 542 of file ReliabilityLayer.h.

Definition at line 540 of file ReliabilityLayer.h.

Definition at line 406 of file ReliabilityLayer.h.

Definition at line 507 of file ReliabilityLayer.h.

Memory-efficient receivedPackets algorithm: receivedPacketsBaseIndex is the packet number we are expecting Everything under receivedPacketsBaseIndex is a packet we already got Everything over receivedPacketsBaseIndex is stored in hasReceivedPacketQueue It stores the time to stop waiting for a particular packet number, where the packet number is receivedPacketsBaseIndex + the index into the queue If 0, we got got that packet. Otherwise, the time to give up waiting for that packet. If we get a packet number where (receivedPacketsBaseIndex-packetNumber) is less than half the range of receivedPacketsBaseIndex then it is a duplicate Otherwise, it is a duplicate packet (and ignore it).

Definition at line 462 of file ReliabilityLayer.h.

Definition at line 441 of file ReliabilityLayer.h.

Definition at line 439 of file ReliabilityLayer.h.

Definition at line 549 of file ReliabilityLayer.h.

Definition at line 403 of file ReliabilityLayer.h.

Definition at line 365 of file ReliabilityLayer.h.

Definition at line 573 of file ReliabilityLayer.h.

Definition at line 466 of file ReliabilityLayer.h.

DataStructures::RangeList<DatagramSequenceNumberType> RakNet::ReliabilityLayer::NAKs [private]

Definition at line 557 of file ReliabilityLayer.h.

Definition at line 509 of file ReliabilityLayer.h.

Definition at line 480 of file ReliabilityLayer.h.

Definition at line 467 of file ReliabilityLayer.h.

Definition at line 437 of file ReliabilityLayer.h.

Definition at line 433 of file ReliabilityLayer.h.

Definition at line 440 of file ReliabilityLayer.h.

Definition at line 392 of file ReliabilityLayer.h.

Definition at line 393 of file ReliabilityLayer.h.

Definition at line 332 of file ReliabilityLayer.h.

Definition at line 537 of file ReliabilityLayer.h.

Definition at line 536 of file ReliabilityLayer.h.

Definition at line 539 of file ReliabilityLayer.h.

DatagramSequenceNumberType RakNet::ReliabilityLayer::receivedPacketsBaseIndex [private]

Definition at line 463 of file ReliabilityLayer.h.

Definition at line 487 of file ReliabilityLayer.h.

Definition at line 570 of file ReliabilityLayer.h.

Definition at line 558 of file ReliabilityLayer.h.

Definition at line 475 of file ReliabilityLayer.h.

Definition at line 367 of file ReliabilityLayer.h.

Definition at line 368 of file ReliabilityLayer.h.

Definition at line 464 of file ReliabilityLayer.h.

Definition at line 402 of file ReliabilityLayer.h.

Definition at line 435 of file ReliabilityLayer.h.

Definition at line 333 of file ReliabilityLayer.h.

Definition at line 400 of file ReliabilityLayer.h.

Definition at line 407 of file ReliabilityLayer.h.

Definition at line 412 of file ReliabilityLayer.h.

Definition at line 485 of file ReliabilityLayer.h.

Definition at line 467 of file ReliabilityLayer.h.

Definition at line 382 of file ReliabilityLayer.h.

Referenced by GetTimeLastDatagramArrived().

Definition at line 545 of file ReliabilityLayer.h.

Definition at line 408 of file ReliabilityLayer.h.

Definition at line 546 of file ReliabilityLayer.h.

Definition at line 544 of file ReliabilityLayer.h.

Definition at line 519 of file ReliabilityLayer.h.

Definition at line 369 of file ReliabilityLayer.h.

Definition at line 334 of file ReliabilityLayer.h.

Definition at line 405 of file ReliabilityLayer.h.


The documentation for this class was generated from the following file:

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net