|
Public Member Functions |
| ReliabilityLayer () |
| Constructor.
|
| ~ReliabilityLayer () |
| Destructor.
|
void | Reset (bool resetVariables) |
| Resets the layer for reuse.
|
void | SetEncryptionKey (const unsigned char *key) |
void | SetSocket (SOCKET s) |
SOCKET | GetSocket (void) |
void | SetTimeoutTime (RakNetTime time) |
RakNetTime | GetTimeoutTime (void) |
bool | HandleSocketReceiveFromConnectedPlayer (const char *buffer, int length, PlayerID playerId, DataStructures::List< PluginInterface * > &messageHandlerList, int MTUSize) |
int | Receive (unsigned char **data) |
bool | Send (char *data, int numberOfBitsToSend, PacketPriority priority, PacketReliability reliability, unsigned char orderingChannel, bool makeDataCopy, int MTUSize, RakNetTimeNS currentTime) |
void | Update (SOCKET s, PlayerID playerId, int MTUSize, RakNetTimeNS time, DataStructures::List< PluginInterface * > &messageHandlerList) |
bool | IsCheater (void) const |
bool | IsDeadConnection (void) const |
void | KillConnection (void) |
| Causes IsDeadConnection to return true.
|
void | SetPing (RakNetTime i) |
RakNetStatisticsStruct *const | GetStatistics (void) |
bool | IsDataWaiting (void) |
| Are we waiting for any data to be sent out or be processed by the player?
|
bool | AreAcksWaiting (void) |
void | ApplyNetworkSimulator (double _maxSendBPS, RakNetTime _minExtraPing, RakNetTime _extraPingVariance) |
bool | IsNetworkSimulatorActive (void) |
void | SetSplitMessageProgressInterval (int interval) |
void | SetUnreliableTimeout (RakNetTime timeoutMS) |
Private Member Functions |
unsigned | GenerateDatagram (RakNet::BitStream *output, int MTUSize, bool *reliableDataSent, RakNetTimeNS time, PlayerID playerId, DataStructures::List< PluginInterface * > &messageHandlerList) |
void | SendBitStream (SOCKET s, PlayerID playerId, RakNet::BitStream *bitStream) |
int | WriteToBitStreamFromInternalPacket (RakNet::BitStream *bitStream, const InternalPacket *const internalPacket) |
| Parse an internalPacket and create a bitstream to represent this dataReturns number of bits used.
|
InternalPacket * | CreateInternalPacketFromBitStream (RakNet::BitStream *bitStream, RakNetTimeNS time) |
| Parse a bitstream and create an internal packet to represent this data.
|
unsigned | RemovePacketFromResendListAndDeleteOlderReliableSequenced (const MessageNumberType messageNumber, RakNetTimeNS time) |
| Does what the function name says.
|
void | SendAcknowledgementPacket (const MessageNumberType messageNumber, RakNetTimeNS time) |
| Acknowledge receipt of the packet with the specified messageNumber.
|
bool | IsSendThrottled (int MTUSize) |
| This will return true if we should not send at this time.
|
void | UpdateWindowFromPacketloss (RakNetTimeNS time) |
| We lost a packet.
|
void | UpdateWindowFromAck (RakNetTimeNS time) |
| Increase the window size.
|
int | GetBitStreamHeaderLength (const InternalPacket *const internalPacket) |
| Parse an internalPacket and figure out how many header bits would be written. Returns that number.
|
void | GetSHA1 (unsigned char *const buffer, unsigned int nbytes, char code[SHA1_LENGTH]) |
| Get the SHA1 code.
|
bool | CheckSHA1 (char code[SHA1_LENGTH], unsigned char *const buffer, unsigned int nbytes) |
| Check the SHA1 code.
|
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.
|
bool | IsOlderOrderedPacket (OrderingIndexType newPacketOrderingIndex, OrderingIndexType waitingForPacketOrderingIndex) |
| Returns true if newPacketOrderingIndex is older than the waitingForPacketOrderingIndex.
|
void | SplitPacket (InternalPacket *internalPacket, int MTUSize) |
| Split the passed packet into chunks under MTU_SIZE bytes (including headers) and save those new chunks.
|
void | InsertIntoSplitPacketList (InternalPacket *internalPacket, RakNetTimeNS time) |
| Insert a packet into the split packet list.
|
InternalPacket * | BuildPacketFromSplitPacketList (SplitPacketIdType splitPacketId, RakNetTimeNS time) |
| Take all split chunks with the specified splitPacketId and try to reconstruct a packet. If we can, allocate and return it. Otherwise return 0.
|
void | DeleteOldUnreliableSplitPackets (RakNetTimeNS time) |
| Delete any unreliable split packets that have long since expired.
|
InternalPacket * | CreateInternalPacketCopy (InternalPacket *original, int dataByteOffset, int dataByteLength, RakNetTimeNS time) |
DataStructures::LinkedList<
InternalPacket * > * | GetOrderingListAtOrderingStream (unsigned char orderingChannel) |
| Get the specified ordering list.
|
void | AddToOrderingList (InternalPacket *internalPacket) |
| Add the internal packet to the ordering list in order based on order index.
|
void | InsertPacketIntoResendList (InternalPacket *internalPacket, RakNetTimeNS time, bool makeCopyOfInternalPacket, bool firstResend) |
| Inserts a packet into the resend list in order.
|
void | FreeMemory (bool freeAllImmediately) |
| Memory handling.
|
void | FreeThreadedMemory (void) |
| Memory handling.
|
void | FreeThreadSafeMemory (void) |
| Memory handling.
|
void | InitializeVariables (void) |
bool | IsExpiredTime (unsigned int input, RakNetTimeNS currentTime) const |
| Given the current time, is this time so old that we should consider it a timeout?
|
void | UpdateNextActionTime (void) |
unsigned int | GetResendListDataSize (void) const |
| How many elements are waiting to be resent?
|
void | UpdateThreadedMemory (void) |
| Update all memory which is not threadsafe.
|
void | CalculateHistogramAckSize (void) |
Private Attributes |
DataStructures::List< DataStructures::LinkedList<
InternalPacket * > * > | orderingList |
DataStructures::Queue< InternalPacket * > | outputQueue |
DataStructures::RangeList<
MessageNumberType > | acknowlegements |
RakNetTimeNS | nextAckTime |
int | splitMessageProgressInterval |
RakNetTimeNS | unreliableTimeout |
DataStructures::BPlusTree<
MessageNumberType, InternalPacket *,
RESEND_TREE_ORDER > | resendList |
DataStructures::Queue< InternalPacket * > | resendQueue |
DataStructures::Queue< InternalPacket * > | sendPacketSet [NUMBER_OF_PRIORITIES] |
DataStructures::OrderedList<
SplitPacketIdType, SplitPacketChannel *,
SplitPacketChannelComp > | splitPacketChannelList |
MessageNumberType | messageNumber |
RakNetTimeNS | lastAckTime |
RakNet::BitStream | updateBitStream |
OrderingIndexType | waitingForOrderedPacketWriteIndex [NUMBER_OF_ORDERED_STREAMS] |
OrderingIndexType | waitingForSequencedPacketWriteIndex [NUMBER_OF_ORDERED_STREAMS] |
OrderingIndexType | waitingForOrderedPacketReadIndex [NUMBER_OF_ORDERED_STREAMS] |
OrderingIndexType | waitingForSequencedPacketReadIndex [NUMBER_OF_ORDERED_STREAMS] |
bool | deadConnection |
bool | cheater |
RakNetTime | ping |
SplitPacketIdType | splitPacketId |
RakNetTime | timeoutTime |
unsigned int | blockWindowIncreaseUntilTime |
RakNetStatisticsStruct | statistics |
DataStructures::Queue< RakNetTimeNS > | hasReceivedPacketQueue |
MessageNumberType | receivedPacketsBaseIndex |
bool | resetReceivedPackets |
RakNetTimeNS | lastUpdateTime |
RakNetTimeNS | histogramEndTime |
RakNetTimeNS | histogramStartTime |
unsigned | histogramReceiveMarker |
int | noPacketlossIncreaseCount |
unsigned | histogramPlossCount |
unsigned | histogramAckCount |
double | lowBandwidth |
double | highBandwidth |
double | currentBandwidth |
double | availableBandwidth |
bool | continuousSend |
DataBlockEncryptor | encryptor |
unsigned | sendPacketCount |
unsigned | receivePacketCount |
RakNetTimeNS | ackTimeIncrement |
bool | freeThreadedMemoryOnNextUpdate |
| This variable is so that free memory can be called by only the update thread so we don't have to mutex things so much.
|
DataStructures::List< DataAndTime * > | delayList |
double | maxSendBPS |
RakNetTime | minExtraPing |
RakNetTime | extraPingVariance |
InternalPacketPool | internalPacketPool |
Classes |
struct | DataAndTime |