|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.TCP.Rcv_WndManager
Receive window manager keeps a record of the receive window parameters and change their value accordingly when it receives a new message and sends an ACK. It maintains the receive buffer and keeps all the messages in order before they are read by upper layer Application.
| Field Summary | |
int |
AdvertisedWnd
Size of the advertised window |
protected int |
GapPosition
Index of the first out-of-sequence packet in the Receive Buffer |
protected long |
LastRcvd
Sequence number of the last received packet |
protected long |
LastRead
Sequence number of the last packet read by application |
int |
MAX_RCV_WND
Default maximum receive window size |
long |
maxAdvertised
|
int |
MSS
|
protected long |
NextExpected
Sequence number of the next expected packet to receive ( = ACK number). |
protected tcpSession |
owner
Reference to the owner of this receive window manager |
protected TCP_Message[] |
Rcv_Buffer
Receive buffer for the received messages, including out of order messages. |
static int |
SIZE
Maximum number of packets in receive buffer |
protected TCP_Header |
tcpHdr
template of the reply message |
| Method Summary | |
void |
Calc_AdvertisedWindow()
Calculate the size of the advertised window which indicate the maximum number of bytes that can be received in the buffer. |
void |
push_Process()
push all received and ordered virtual data to upper layer protocol session |
void |
Rcv_DataProcess(ProtocolMessage message)
Process receives a data message, sorts messages in sequence number order, sends acknowledgment message with next expected sequence number and advertised window size, checks if the message contains flags indicating the end of data transmission. |
void |
Rcv_WndInit(TCP_Message data)
Initialize the receive window according to message received. |
void |
ReassembleMessage()
Sort the messages by sequence number, discard the message if it's duplicated, increase the next expected sequence number if needed. |
void |
Send_Ack_Process()
Send ACK for the received in-sequence packet with the highest sequence number. |
void |
setACK(TCP_Message tcpMsg)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected tcpSession owner
protected long NextExpected
protected long LastRead
protected long LastRcvd
protected int GapPosition
public int AdvertisedWnd
public long maxAdvertised
public int MAX_RCV_WND
public static final int SIZE
public int MSS
protected TCP_Header tcpHdr
protected TCP_Message[] Rcv_Buffer
| Method Detail |
public void Calc_AdvertisedWindow()
public void ReassembleMessage()
public void Rcv_WndInit(TCP_Message data)
public void Rcv_DataProcess(ProtocolMessage message)
throws TCPException
message - received TCP message
TCPExceptionpublic void Send_Ack_Process()
public void setACK(TCP_Message tcpMsg)
public void push_Process()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||