Sedona

sox::SendWindow


sys::Obj
  sox::SendWindow

public class SendWindow

SendWindow manages the outgoing messages and keeps enough information needed to recreate the message on a retry.


PKT_RETRY_INTERVAL

public static const define int PKT_RETRY_INTERVAL

max

public static const define int max

numUnacked

public byte numUnacked

packets

public inline SendPacket[] packets

seqNum

public short seqNum

checkAckHeaders

public bool checkAckHeaders(SoxService service, int numFields)

If we have any ack headers then process them. Return true if the sending window isn't full - if we return false, then we don't have room to store any additional outgoing messages.

isAcked

public bool isAcked(int unackStart, int unackEnd, int ackNum, byte[] ackMore, int ackMoreOff, int ackMoreLen, int seqNum)

Return if the specified seqNum should be considered acked. The unackStart and unackEnd define the inclusive range of what the remote endpoint has not acked (which means anything outside of that range is immediately considered acked). We also check our ackMore mask for unordered acks.

nextPacket

public SendPacket nextPacket()

Allocate a SendPacket which stores how to resend the message.

nextSeqNum

public int nextSeqNum()

Allocate the next outgoing sequence number.

reset

public void reset()

Reset into a clean state for new session.

sendRetries

public bool sendRetries(SoxService service, SoxSession session, int houseKeepingTicks)

If we have any unacked outgoing messages, then resend them. Return if we did work.