net.clackrouter.component.tcp
Class Retransmitter

java.lang.Object
  extended by net.clackrouter.component.base.ClackComponent
      extended by net.clackrouter.component.tcp.Retransmitter
All Implemented Interfaces:
Alarm

public class Retransmitter
extends ClackComponent

TCP subcomponent that handles timeouts and the retransmission of unacknowledged packets.


Nested Class Summary
 class Retransmitter.RetransListEntry
           
 
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent
ClackComponent.Waiter
 
Field Summary
 java.util.ArrayList mRetrans
           
 TCB mTCB
           
static int NUM_PORTS
           
static int PORT_NET_OUT
           
static int PORT_PROCESS_IN
           
static int PORT_PROCESS_OUT
           
static int PORT_STORE_IN
           
 
Fields inherited from class net.clackrouter.component.base.ClackComponent
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT, view
 
Constructor Summary
Retransmitter(TCB tcb, Router router, java.lang.String name)
           
 
Method Summary
 void acceptPacket(VNSPacket packet, int port_num)
          Depending on the input port, either removes acknowledged data from its retransmission list, or stores a packet in the retrans list.
 void poll()
          Checks to see if any timeouts have occured, in which case it retransmits packets.
protected  void setupPorts(int numports)
          Allocates an array of ClackPort objects to be used by this component
 
Methods inherited from class net.clackrouter.component.base.ClackComponent
createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getColor, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getPropertiesView, getRouter, getSerializableProperties, getTime, getTypeName, getUniqueCount, getView, handlePullRequest, hasError, initializeProperties, isHierarchical, isModifying, log, notifyAlarm, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT_PROCESS_IN

public static int PORT_PROCESS_IN

PORT_STORE_IN

public static int PORT_STORE_IN

PORT_NET_OUT

public static int PORT_NET_OUT

PORT_PROCESS_OUT

public static int PORT_PROCESS_OUT

NUM_PORTS

public static int NUM_PORTS

mRetrans

public java.util.ArrayList mRetrans

mTCB

public TCB mTCB
Constructor Detail

Retransmitter

public Retransmitter(TCB tcb,
                     Router router,
                     java.lang.String name)
Method Detail

setupPorts

protected void setupPorts(int numports)
Description copied from class: ClackComponent
Allocates an array of ClackPort objects to be used by this component

Overrides:
setupPorts in class ClackComponent
Parameters:
numports - the number of ports to create

acceptPacket

public void acceptPacket(VNSPacket packet,
                         int port_num)
Depending on the input port, either removes acknowledged data from its retransmission list, or stores a packet in the retrans list.

Overrides:
acceptPacket in class ClackComponent
Parameters:
packet - The pushed packet
port_num - The number of the port that this packet is arriving on

poll

public void poll()
Checks to see if any timeouts have occured, in which case it retransmits packets.

Overrides:
poll in class ClackComponent