net.clackrouter.component.tcp
Class SendWindowCheck

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

public class SendWindowCheck
extends ClackComponent

Class that monitors the sending of TCP data segments, and makes sure it is within the valid sending window.

Since congestion control is not currently implemented, this window is a static size.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent
ClackComponent.Waiter
 
Field Summary
static int NUM_PORTS
           
static int PORT_APP_IN
           
static int PORT_NET_OUT
           
 
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
SendWindowCheck(TCB t, Router router, java.lang.String name)
           
 
Method Summary
 void app_close_request()
          Used to notify the TCP stack that the application has called close on the socket.
 void poll()
          Checks to see if the component can send any data right now, and if data exists and the window and TCP state allows, this data is sent.
 void send_empty_packet(int flags)
          Creates and sends a packet with no data
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
acceptPacket, 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_NET_OUT

public static final int PORT_NET_OUT
See Also:
Constant Field Values

PORT_APP_IN

public static final int PORT_APP_IN
See Also:
Constant Field Values

NUM_PORTS

public static final int NUM_PORTS
See Also:
Constant Field Values
Constructor Detail

SendWindowCheck

public SendWindowCheck(TCB t,
                       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

poll

public void poll()
Checks to see if the component can send any data right now, and if data exists and the window and TCP state allows, this data is sent.

Overrides:
poll in class ClackComponent

send_empty_packet

public void send_empty_packet(int flags)
Creates and sends a packet with no data

Parameters:
flags - header flags for this packet

app_close_request

public void app_close_request()
Used to notify the TCP stack that the application has called close on the socket.