net.clackrouter.component.tcp
Class ProcessSegment
java.lang.Object
net.clackrouter.component.base.ClackComponent
net.clackrouter.component.tcp.ProcessSegment
- All Implemented Interfaces:
- Alarm
public class ProcessSegment
- extends ClackComponent
TCP subcomponent that processes data and send acknowledgements.
Also processes the FIN flag and notifies the socket when all data has been
received.
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 |
Method Summary |
void |
acceptPacket(VNSPacket packet,
int port_num)
The starting point for packet-processing when packets are "pushed" to this component. |
void |
reset(TCB t)
|
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, poll, 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 |
PORT_ACK_OUT
public static final int PORT_ACK_OUT
- See Also:
- Constant Field Values
PORT_NEWDATA_IN
public static final int PORT_NEWDATA_IN
- See Also:
- Constant Field Values
PORT_APP_OUT
public static final int PORT_APP_OUT
- See Also:
- Constant Field Values
NUM_PORTS
public static final int NUM_PORTS
- See Also:
- Constant Field Values
ProcessSegment
public ProcessSegment(TCB t,
Router router,
java.lang.String name)
reset
public void reset(TCB t)
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)
- Description copied from class:
ClackComponent
The starting point for packet-processing when packets are "pushed" to this component.
The default implementation warns that the packet is being ignored.
- Overrides:
acceptPacket
in class ClackComponent
- Parameters:
packet
- The pushed packetport_num
- The number of the port that this packet is arriving on