|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimnet.NATRouter.Connection
Class to store all relevant information about a given connection.
| Field Summary | |
(package private) int |
externalPort
The port we will use to uniquely identify this connection to the outside world. |
(package private) int |
internalIP
The NATted IP address of the sending node. |
(package private) int |
internalPort
The port on which this connection was originally established. |
(package private) int |
lastSeqNum
If this is a TCP connection, then use this field to match up ACKs to FINs |
(package private) int |
proto
The protocol this connection uses. |
(package private) NATRouter.StaleConnectionRemover |
scr
A TimerTask that will remove this connection when it is no longer in use. |
(package private) long |
timeOfLastUse
The last time a packet was sent over this connection |
| Constructor Summary | |
NATRouter.Connection(int internalIP,
int internalPort,
int externalPort,
int proto)
Create this connection. |
|
| Method Summary | |
java.lang.String |
toString()
Print out our basic stats. |
void |
updateUsage()
Set the timeOfLastUse to the current time so
TimerTasks will know that this connection is still active. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
int internalIP
int internalPort
int externalPort
int proto
long timeOfLastUse
NATRouter.StaleConnectionRemover scr
int lastSeqNum
| Constructor Detail |
public NATRouter.Connection(int internalIP,
int internalPort,
int externalPort,
int proto)
internalIP - the original source address (NATted)internalPort - the orignal portexternalPort - the port we will use on the outside to uniquely ID this connectionproto - The protocol of this connection| Method Detail |
public void updateUsage()
timeOfLastUse to the current time so
TimerTasks will know that this connection is still active.
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||