|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.TCP.Send_WndManager
Send window manager manages sending data messages and receives ACKs. It maintains a send queue and the send window parameters, calculates RTTs, implements fast retransmission, fast recovery and slow start algorithms.
| Field Summary | |
int |
AdvertisedWnd
Advertised Window Size of Receiver contained in ACK message. |
boolean |
FINsent
indicate if a FIN message has been put into the send queue |
long |
FirstUnACKed
The first unacknowledged sequence number. |
long |
InitSEQno
Initial send sequence number. |
long |
LastSent
The highest sequence number that has been sent. |
long |
LastWritten
The sequence number of the last packet written by application (reserved). |
int |
maxSendWnd
|
int |
MSS
the maximum segment size of one TCP packet |
SSF.OS.TCP.SendQueue |
SendBuffer
Send Queue for this TCP session. |
long |
SendNext
The sequence number to be send next. |
| Constructor Summary | |
Send_WndManager(tcpSession sessHlp,
tcpSessionMaster init)
Initialize the send window parameters |
|
| Method Summary | |
int |
calc_EffectiveWnd()
Calculates the effective size of send window. |
void |
calc_RTT()
Collect new round-trip time estimate and update averages and current timeout. |
void |
calc_ssthresh()
Set slow start thresh to the half of the flight size when loss begins, min(conWnd, AdvertisedWnd)/2, but no less than 2*MSS. |
void |
Dup_Ack_Process()
process called when receiving the 3rd duplicated ACKs, implement fast retransmission and fast recovery |
void |
Rcv_Ack_Process(TCP_Message msg)
Process ACKs, if not duplicate ACKs cancel the retransmission timer otherwise retransmits the lost packet. |
void |
Rexmit()
Retransmition process when rexit timer expires. |
void |
Send_Data_Process()
calculate the send window size and send that number of bytes of data if send queue has enough data to be sent or send out whatever in the send queue, set retransmission timer for each packet. |
int |
TCP_REXMTVAL()
calculate RTO by scaled value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public long InitSEQno
public long LastSent
public long SendNext
public long LastWritten
public long FirstUnACKed
public int AdvertisedWnd
public SSF.OS.TCP.SendQueue SendBuffer
public int maxSendWnd
public int MSS
public boolean FINsent
| Constructor Detail |
public Send_WndManager(tcpSession sessHlp,
tcpSessionMaster init)
| Method Detail |
public int TCP_REXMTVAL()
public void Rcv_Ack_Process(TCP_Message msg)
public void Dup_Ack_Process()
public void Send_Data_Process()
public void Rexmit()
With Karn's algorithm, two retransmissions are considered consecutive (see rexShift) if there was no RTT calculation between these two retransmissions. In other words if a segment was retransmitted, and either the same segment is retransmitted again, or the next segment is again retransmitted, these are two consecutive retransmissions.
Thus a case of the 12 consecutive retransmissions may occur when the same segment is retrasmitted 12 times; but also when 12 consecutive segments are sent and each of them is retransmitted once, etc.
Otherwise, enter slow start.
public void calc_ssthresh()
public void calc_RTT()
Err = M - A
A <- A + g * Err -- g = 0.125
D <- D + h * (|Err| - D) -- h = 0.25
RTO = A + 4 * D
public int calc_EffectiveWnd()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||