FNetPacketNotify - Drives delivery of sequence numbers, acknowledgments and notifications of delivery sequence numbers 更多...
#include <NetPacketNotify.h>
Public 成员函数 | |
| void | AckSeq (SequenceNumberT Seq) |
| Mark Seq as received and update current InSeq, missing sequence numbers will be marked as lost | |
| bool | CanSend () const |
| If we do have more unacknowledged sequence numbers in-flight than our maximum sendwindow we should not send more as the receiving end will not be able to detect if the sequence number has wrapped around | |
| SequenceNumberT | CommitAndIncrementOutSeq () |
| Increment outgoing seq number and commit data | |
| FNetPacketNotify () | |
| Constructor | |
| SIZE_T | GetCurrentSequenceHistoryLength () const |
| Get the current sequenceHistory length in bits | |
| SequenceNumberT | GetInAckSeq () const |
| Get the last received sequence number that we have accepted, InAckSeq cannot be larger than InSeq | |
| SequenceNumberT | GetInSeq () const |
| Get the last received in sequence number | |
| const SequenceHistoryT & | GetInSeqHistory () const |
| Get the current SequenceHistory | |
| SequenceNumberT | GetOutAckSeq () const |
| Get the last outgoing sequence number acknowledged by remote | |
| SequenceNumberT | GetOutSeq () const |
| Get the current outgoing sequence number | |
| SequenceNumberT::DifferenceT | GetSequenceDelta (const FNotificationHeader &NotificationData) |
| Gets the delta between the present sequence, and the sequence inside the specified header - if the delta is positive | |
| void | Init (SequenceNumberT InitialInSeq, SequenceNumberT InitialOutSeq) |
| Init notification with expected initial sequence numbers | |
| void | NakSeq (SequenceNumberT Seq) |
| Explicitly mark Seq as not received and update current InSeq, additional missing sequence numbers will be marked as lost | |
| bool | ReadHeader (FNotificationHeader &Data, FBitReader &Reader) const |
| Read header from stream | |
| template<class Functor > | |
| SequenceNumberT::DifferenceT | Update (const FNotificationHeader &NotificationData, Functor &&InFunc) |
| Update state of PacketNotification based on received header and invoke packet notifications for received acks. 更多... | |
| bool | WriteHeader (FBitWriter &Writer, bool bRefresh=false) |
| Write NotificationHeader, and update outgoing ack record if bRefresh is true we will attempt to refresh a previously written header if the resulting size will be the same as the already written header. 更多... | |
FNetPacketNotify - Drives delivery of sequence numbers, acknowledgments and notifications of delivery sequence numbers
| FNetPacketNotify::SequenceNumberT::DifferenceT FNetPacketNotify::Update | ( | const FNotificationHeader & | NotificationData, |
| Functor && | InFunc | ||
| ) |
Update state of PacketNotification based on received header and invoke packet notifications for received acks.
| NotificationData | The header to update from |
| InFunc | A function in the format (void)(FNetPacketNotify::SequenceNumberT AckedSequence, bool bDelivered) to handle packet notifications. |
| bool FNetPacketNotify::WriteHeader | ( | FBitWriter & | Writer, |
| bool | bRefresh = false |
||
| ) |
Write NotificationHeader, and update outgoing ack record if bRefresh is true we will attempt to refresh a previously written header if the resulting size will be the same as the already written header.
returns true if data was written, and false if no data was written which might be the case if we try to rewrite an existing header but the required size differs.