engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FNetPacketNotify类 参考

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

成员函数说明

◆ Update()

template<class Functor >
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.

参数
NotificationDataThe header to update from
InFuncA function in the format (void)(FNetPacketNotify::SequenceNumberT AckedSequence, bool bDelivered) to handle packet notifications.
返回
The > 0 delta of the incoming seq if within half the seq number space. 0 if the received seq is outside current window ,or the ack seq received is invalid.

◆ WriteHeader()

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.


该类的文档由以下文件生成: