DRCL JavaSim API

drcl.inet.socket
Class TCP_socket

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.comp.Component
              |
              +--drcl.net.Module
                    |
                    +--drcl.inet.Protocol
                          |
                          +--drcl.inet.transport.TCP
                                |
                                +--drcl.inet.transport.TCPb
                                      |
                                      +--drcl.inet.socket.TCP_socket
All Implemented Interfaces:
ActiveComponent, java.lang.Cloneable, drcl.inet.transport.Connection, InetConstants, ObjectDuplicable, java.io.Serializable, TCPConstants

public class TCP_socket
extends TCPb

This class adds 3way-handshaking and SocketContract to TCPb.

Author:
Guanghui He, Hung-ying Tyan
See Also:
Serialized Form

Inner classes inherited from class drcl.inet.transport.TCP
TCP.VegasVariables
 
Inner classes inherited from class drcl.comp.Component
Component.LockPack
 
Fields inherited from class drcl.inet.transport.TCPb
NS_COMPATIBLE
 
Fields inherited from class drcl.inet.transport.TCP
ackPort, AWND, backoff, burst, bytesRetx, cur_rtt, CWND, cwndPort, DEBUG_ACK, DEBUG_DUPACK, DEBUG_LEVELS, DEBUG_RTT, DEBUG_SACK, DEBUG_SAMPLE, DEBUG_SEND, DEBUG_TIMEOUT, DEBUG_VEGAS, dt_max, dup_ack, implementation, maxburst, MAXCWND, maxrto, MSS, numack, numTimeouts, recvBuffer, rttvar_bits, rttvar_exp, rttvar_init, rttvarPort, rtxcur_init, SACK, sbuffer, seqNoPort, snd_max, snd_nxt, snd_nxt_marked, snd_nxt_recorded, snd_una, srtt_bits, srtt_init, srttPort, sstPort, state, sthld, t_grain, t_rttvar, t_rtxcur, t_srtt, TTL, vegas
 
Fields inherited from class drcl.net.Module
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, lockHead, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Fields inherited from interface drcl.inet.transport.TCPConstants
ACK_EVENT, ACK_PORT_ID, AWND_DEFAULT, CLOSE_WAIT, CLOSED, CLOSING, CWND_EVENT, CWND_PORT_ID, DEFAULT_PID, DELAY_ACK, ESTABLISHED, ESTABLISHED_FIN, ESTABLISHED_OVER, FIN_WAIT_1, FIN_WAIT_2, LAST_ACK, LISTEN, LISTEN1, LISTEN2, MAXCWND_DEFAULT, NEW_RENO, NUMDUPACKS, PRE_CLOSED, PRE_LAST_ACK, PRE_SYN_SENT, RECEIVE, RENO, RTT_EVT, RTTVAR_EVENT, RTTVAR_PORT_ID, RXT_EVT, SEND, SEQNO_EVENT, SEQNO_PORT_ID, SEQNO_RCV_EVENT, SEQNO_RCV_PORT_ID, SEQNO_SENT_EVENT, SEQNO_SENT_PORT_ID, SRTT_EVENT, SRTT_PORT_ID, SST_EVENT, SST_PORT_ID, STATES, SYN_RCVD, SYN_SENT, TAHOE, TIME_WAIT, TIMEOUT_TYPES, VEGAS
 
Fields inherited from interface drcl.inet.InetConstants
BYTE_MODE, DEFAULT_BANDWIDTH, DEFAULT_BUFFER_SIZE, DEFAULT_MTU, EVENT_ID_CHANGED_PORT_ID, EVENT_IDENTITY_ADDED, EVENT_IDENTITY_REMOVED, EVENT_IF_NEIGHBOR_DOWN, EVENT_IF_NEIGHBOR_UP, EVENT_IF_PORT_ID, EVENT_MCAST_HOST_PORT_ID, EVENT_PKT_ARRIVAL, EVENT_PKT_ARRIVAL_PORT_ID, EVENT_RT_ENTRY_ADDED, EVENT_RT_ENTRY_MODIFIED, EVENT_RT_ENTRY_REMOVED, EVENT_RT_MCAST_CHANGED_PORT_ID, EVENT_RT_UCAST_CHANGED_PORT_ID, EVENT_VIF_NEIGHBOR_DOWN, EVENT_VIF_NEIGHBOR_UP, EVENT_VIF_PORT_ID, HOST_ENTRY_EXT, ID_CSL, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, PID_UDP, SERVICE_CONFIGSW_PORT_ID, SERVICE_ID_PORT_ID, SERVICE_IF_PORT_ID, SERVICE_MCAST_PORT_ID, SERVICE_RT_PORT_ID, UCAST_QUERY_PORT_ID
 
Constructor Summary
TCP_socket()
           
TCP_socket(java.lang.String id_)
           
 
Method Summary
protected  void dataArriveAtDownPort(java.lang.Object data_, Port downPort_)
          The down port follows the PktDelivery contract.
protected  void dataArriveAtUpPort(java.lang.Object data_, Port upPort_)
          The handler invoked when a packet arrives at an "up" port.
 void duplicate(java.lang.Object source_)
          Duplicates the content of source_, including ID, name, child components and connections among them, to this component.
 long getLocalAddr()
          Returns the local address.
 int getLocalPort()
          Returns the local port.
 int getRemotePort()
          Returns the peer port.
 java.lang.String info()
          Returns information regarding this component.
 void reset()
          Resets the component for being used anew.
protected  void timeout(java.lang.Object evt_)
          The handler invoked when a timeout event occurs.
 
Methods inherited from class drcl.inet.transport.TCPb
getAckNo, getAvailableRcvBuffer, getAvailableReceivingBuffers, getDelayACKTimeout, getName, getReceivingBuffers, isDelayACKEnabled, setDelayACKEnabled, setDelayACKTimeout, setDownPort, setMSS, setPeer, setReceivingBuffers, setSackEnabled, setTTL
 
Methods inherited from class drcl.inet.transport.TCP
_start, ack_syn_fin, configInfo, configureRTT, getBASERTT_INIT, getDebugLevelNames, getImplementation, getMAXCWND, getMAXRTO, getMSS, getNumBytesRetransmitted, getNumTimeouts, getPeer, getRTTVAR_INIT, getSendingBuffer, getSeqNo, getSRTT_INIT, getState, getTick, getTTL, isMaxburstEnabled, isSackEnabled, option_process, recv, resetRXTTimer, rtt_init, rtt_update, rxt_timer, seq_max, setBASERTT_INIT, setImplementation, setMaxburstEnabled, setMAXCWND, setMAXRTO, setRTTVAR_INIT, setSRTT_INIT, setTick, snd_maxpck, snd_packet, snd_wnd, tcp_init, timer_backoff, win_decrease, win_increase, win_init
 
Methods inherited from class drcl.inet.Protocol
broadcast, broadcast, broadcast, broadcast, broadcast, broadcast, createConfigSwitchPort, createIDChangedEventPort, createIDServicePort, createIFEventPort, createIFQueryPort, createMcastHostEventPort, createMcastQueryPort, createMulticastRTChangedEventPort, createPktArrivalEventPort, createRTServicePort, createUcastQueryPort, createUnicastRTChangedEventPort, createVIFEventPort, forward, forward, forward, forward, forward, forward, idAddedEventHandler, idRemovedEventHandler, mcastHostJoinEventHandler, mcastHostLeaveEventHandler, mcastQueryHandler, neighborDownEventHandler, neighborUpEventHandler, pktArrivalHandler, processOther, rtAddedEventHandler, rtModifiedEventHandler, rtRemovedEventHandler, ucastQueryHandler, vNeighborDownEventHandler, vNeighborUpEventHandler
 
Methods inherited from class drcl.net.Module
cancelTimeout, deliver, getAddress, process, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
_resume, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getForkManager, getID, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portAdded, portRemoved, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TCP_socket

public TCP_socket()

TCP_socket

public TCP_socket(java.lang.String id_)
Method Detail

reset

public void reset()
Description copied from class: Component
Resets the component for being used anew. All the internal variables must be set to the initial state. All the ports and child components are reset as well.
Overrides:
reset in class TCPb

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: Component
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. Subclasses need to override this method to copy its own variables.
Overrides:
duplicate in class TCPb

info

public java.lang.String info()
Description copied from class: Component
Returns information regarding this component. Subclasses should override this method to provide useful information at run-time.
Overrides:
info in class TCPb

timeout

protected void timeout(java.lang.Object evt_)
Description copied from class: Module
The handler invoked when a timeout event occurs. Subclasses should override it to handle such an event.
Overrides:
timeout in class TCP
Following copied from class: drcl.net.Module
See Also:
Module.setTimeout(Object, double), Module.setTimeoutAt(Object, double)

dataArriveAtUpPort

protected void dataArriveAtUpPort(java.lang.Object data_,
                                  Port upPort_)
Description copied from class: Module
The handler invoked when a packet arrives at an "up" port. Subclasses should override it to handle such an event.
Overrides:
dataArriveAtUpPort in class TCPb

dataArriveAtDownPort

protected void dataArriveAtDownPort(java.lang.Object data_,
                                    Port downPort_)
Description copied from class: TCPb
The down port follows the PktDelivery contract.
Overrides:
dataArriveAtDownPort in class TCPb

getLocalPort

public int getLocalPort()
Description copied from interface: drcl.inet.transport.Connection
Returns the local port.
Overrides:
getLocalPort in class TCP

getRemotePort

public int getRemotePort()
Description copied from interface: drcl.inet.transport.Connection
Returns the peer port.
Overrides:
getRemotePort in class TCP

getLocalAddr

public long getLocalAddr()
Description copied from interface: drcl.inet.transport.Connection
Returns the local address.
Overrides:
getLocalAddr in class TCP

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~