![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
Datagram reliable, ordered, unordered and sequenced sends. Flow control. Message splitting, reassembly, and coalescence.
#include <ReliabilityLayer.h>
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 |
| RakNetStatistics * | GetStatistics (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) |
| MessageNumberNode * | AddFirstToDatagramHistory (DatagramSequenceNumberType datagramNumber, DatagramSequenceNumberType messageNumber, CCTimeType timeSent) |
| MessageNumberNode * | AddSubsequentToDatagramHistory (MessageNumberNode *messageNumberNode, DatagramSequenceNumberType messageNumber) |
| void | AddToListTail (InternalPacket *internalPacket, bool modifyUnacknowledgedBytes) |
| void | AddToUnreliableLinkedList (InternalPacket *internalPacket) |
| InternalPacket * | AllocateFromInternalPacketPool (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) |
| InternalPacket * | BuildPacketFromSplitPacketList (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. | |
| InternalPacket * | BuildPacketFromSplitPacketList (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) |
| InternalPacket * | CreateInternalPacketCopy (InternalPacket *original, int dataByteOffset, int dataByteLength, CCTimeType time) |
| Delete any unreliable split packets that have long since expired. | |
| InternalPacket * | CreateInternalPacketFromBitStream (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) |
| MessageNumberNode * | GetMessageNumberNodeByDatagramIndex (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< bool > | datagramsToSendThisUpdateIsPair |
| bool | deadConnection |
| CCTimeType | elapsedTimeSinceLastUpdate |
| DataStructures::Queue< bool > | hasReceivedPacketQueue |
| 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< bool > | packetsToDeallocThisUpdate |
| DataStructures::List < InternalPacket * > | packetsToSendThisUpdate |
| DataStructures::List< unsigned int > | packetsToSendThisUpdateDatagramBoundaries |
| DatagramSequenceNumberType | receivedPacketsBaseIndex |
| unsigned | receivePacketCount |
| DataStructures::MemoryPool < InternalPacketRefCountedData > | refCountedDataPool |
| bool | remoteSystemNeedsBAndAS |
| RemoteSystemTimeType | remoteSystemTime |
| InternalPacket * | resendBuffer [512] |
| InternalPacket * | resendLinkedListHead |
| 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 |
| InternalPacket * | unreliableLinkedListHead |
| CCTimeType | unreliableTimeout |
| RakNet::BitStream | updateBitStream |
Definition at line 119 of file ReliabilityLayer.h.
| RakNet::ReliabilityLayer::ReliabilityLayer | ( | ) |
| RakNet::ReliabilityLayer::~ReliabilityLayer | ( | ) |
| 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
| CCTimeType RakNet::ReliabilityLayer::GetTimeBetweenPackets | ( | void | ) | const |
| RakNet::TimeMS RakNet::ReliabilityLayer::GetTimeLastDatagramArrived | ( | void | ) | const [inline] |
Definition at line 215 of file ReliabilityLayer.h.
References timeLastDatagramArrived.
{return timeLastDatagramArrived;}
| RakNet::TimeMS RakNet::ReliabilityLayer::GetTimeoutTime | ( | void | ) |
Returns the value passed to SetTimeoutTime. or the default if it was never called
| [out] | the | value 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.
| [in] | buffer | The socket data |
| [in] | length | The length of the socket data |
| [in] | systemAddress | The player that this data is from |
| [in] | messageHandlerList | A list of registered plugins |
| [in] | MTUSize | maximum datagram size |
| true | Success |
| false | Modified 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?
| bool RakNet::ReliabilityLayer::IsExpiredTime | ( | unsigned int | input, |
| CCTimeType | currentTime | ||
| ) | const [private] |
| bool RakNet::ReliabilityLayer::IsNetworkSimulatorActive | ( | void | ) |
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.
| [out] | data | The message |
| 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::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
| [in] | data | The data to send |
| [in] | numberOfBitsToSend | The length of data in bits |
| [in] | priority | The priority level for the send |
| [in] | reliability | The reliability type for the send |
| [in] | orderingChannel | 0 to 31. Specifies what channel to use, for relational ordering and sequencing of packets. |
| [in] | makeDataCopy | If true data will be copied. Otherwise, only a pointer will be stored. |
| [in] | MTUSize | maximum datagram size |
| [in] | currentTime | Current time, as per RakNet::GetTimeMS() |
| [in] | receipt | This 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 |
| 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
| [in] | s | The socket used for sending data |
| [in] | systemAddress | The address and port to send to |
| [in] | bitStream | The 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.
| [in] | time | Time, 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.
| [in] | s | the communication end point |
| [in] | systemAddress | The Unique Player Identifier who shouldhave sent some packets |
| [in] | MTUSize | maximum datagram size |
| [in] | time | current system time |
| [in] | maxBitsPerSecond | if non-zero, enforces that outgoing bandwidth does not exceed this amount |
| [in] | messageHandlerList | A 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
DataStructures::RangeList<DatagramSequenceNumberType> RakNet::ReliabilityLayer::acknowlegements [private] |
Definition at line 556 of file ReliabilityLayer.h.
unsigned char RakNet::ReliabilityLayer::ackPingIndex [private] |
Definition at line 473 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::ackPingSum [private] |
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.
bool RakNet::ReliabilityLayer::cheater [private] |
Definition at line 406 of file ReliabilityLayer.h.
RakNet::CCRakNetSlidingWindow RakNet::ReliabilityLayer::congestionManager [private] |
Definition at line 513 of file ReliabilityLayer.h.
int RakNet::ReliabilityLayer::countdownToNextPacketPair [private] |
Definition at line 552 of file ReliabilityLayer.h.
Definition at line 354 of file ReliabilityLayer.h.
DataStructures::MemoryPool<MessageNumberNode> RakNet::ReliabilityLayer::datagramHistoryMessagePool [private] |
Definition at line 355 of file ReliabilityLayer.h.
DatagramSequenceNumberType RakNet::ReliabilityLayer::datagramHistoryPopCount [private] |
Definition at line 363 of file ReliabilityLayer.h.
DataStructures::List<unsigned int> RakNet::ReliabilityLayer::datagramSizesInBytes [private] |
Definition at line 541 of file ReliabilityLayer.h.
Definition at line 542 of file ReliabilityLayer.h.
Definition at line 540 of file ReliabilityLayer.h.
bool RakNet::ReliabilityLayer::deadConnection [private] |
Definition at line 406 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::elapsedTimeSinceLastUpdate [private] |
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.
OrderingIndexType RakNet::ReliabilityLayer::heapIndexOffsets[32] [private] |
Definition at line 441 of file ReliabilityLayer.h.
Definition at line 439 of file ReliabilityLayer.h.
DataStructures::RangeList<DatagramSequenceNumberType> RakNet::ReliabilityLayer::incomingAcks [private] |
Definition at line 549 of file ReliabilityLayer.h.
Definition at line 403 of file ReliabilityLayer.h.
Definition at line 365 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::lastBpsClear [private] |
Definition at line 573 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::lastUpdateTime [private] |
Definition at line 466 of file ReliabilityLayer.h.
DataStructures::RangeList<DatagramSequenceNumberType> RakNet::ReliabilityLayer::NAKs [private] |
Definition at line 557 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::nextAckTimeToSend [private] |
Definition at line 509 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::nextAllowedThroughputSample [private] |
Definition at line 480 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::nextSendTime [private] |
Definition at line 467 of file ReliabilityLayer.h.
OrderingIndexType RakNet::ReliabilityLayer::orderedReadIndex[32] [private] |
Definition at line 437 of file ReliabilityLayer.h.
OrderingIndexType RakNet::ReliabilityLayer::orderedWriteIndex[32] [private] |
Definition at line 433 of file ReliabilityLayer.h.
DataStructures::Heap<reliabilityHeapWeightType, InternalPacket*, false> RakNet::ReliabilityLayer::orderingHeaps[32] [private] |
Definition at line 440 of file ReliabilityLayer.h.
DataStructures::Heap<reliabilityHeapWeightType, InternalPacket*, false> RakNet::ReliabilityLayer::outgoingPacketBuffer [private] |
Definition at line 392 of file ReliabilityLayer.h.
reliabilityHeapWeightType RakNet::ReliabilityLayer::outgoingPacketBufferNextWeights[NUMBER_OF_PRIORITIES] [private] |
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.
DataStructures::List<unsigned int> RakNet::ReliabilityLayer::packetsToSendThisUpdateDatagramBoundaries [private] |
Definition at line 539 of file ReliabilityLayer.h.
DatagramSequenceNumberType RakNet::ReliabilityLayer::receivedPacketsBaseIndex [private] |
Definition at line 463 of file ReliabilityLayer.h.
unsigned RakNet::ReliabilityLayer::receivePacketCount [private] |
Definition at line 487 of file ReliabilityLayer.h.
DataStructures::MemoryPool<InternalPacketRefCountedData> RakNet::ReliabilityLayer::refCountedDataPool [private] |
Definition at line 570 of file ReliabilityLayer.h.
Definition at line 558 of file ReliabilityLayer.h.
Definition at line 475 of file ReliabilityLayer.h.
InternalPacket* RakNet::ReliabilityLayer::resendBuffer[512] [private] |
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.
int RakNet::ReliabilityLayer::splitMessageProgressInterval [private] |
Definition at line 333 of file ReliabilityLayer.h.
DataStructures::OrderedList<SplitPacketIdType, SplitPacketChannel*, SplitPacketChannelComp> RakNet::ReliabilityLayer::splitPacketChannelList [private] |
Definition at line 400 of file ReliabilityLayer.h.
Definition at line 407 of file ReliabilityLayer.h.
Definition at line 412 of file ReliabilityLayer.h.
long long RakNet::ReliabilityLayer::throughputCapCountdown [private] |
Definition at line 485 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::timeBetweenPackets [private] |
Definition at line 467 of file ReliabilityLayer.h.
Definition at line 382 of file ReliabilityLayer.h.
Referenced by GetTimeLastDatagramArrived().
CCTimeType RakNet::ReliabilityLayer::timeOfLastContinualSend [private] |
Definition at line 545 of file ReliabilityLayer.h.
Definition at line 408 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::timeToNextUnreliableCull [private] |
Definition at line 546 of file ReliabilityLayer.h.
double RakNet::ReliabilityLayer::totalUserDataBytesAcked [private] |
Definition at line 544 of file ReliabilityLayer.h.
Definition at line 519 of file ReliabilityLayer.h.
Definition at line 369 of file ReliabilityLayer.h.
CCTimeType RakNet::ReliabilityLayer::unreliableTimeout [private] |
Definition at line 334 of file ReliabilityLayer.h.
Definition at line 405 of file ReliabilityLayer.h.
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.