|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.trans.TransTcp
public class TransTcp
Implementation of TCP Transport Layer.
| Nested Class Summary | |
|---|---|
static class |
TransTcp.TcpMessage
Data structure for TCP Message. |
static class |
TransTcp.TcpOptions
Implementation for TCP Options. |
| Nested classes/interfaces inherited from interface jist.swans.trans.TransInterface |
|---|
TransInterface.SocketHandler, TransInterface.TransMessage, TransInterface.TransTcpInterface, TransInterface.TransUdpInterface |
| Constructor Summary | |
|---|---|
TransTcp()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addSocketHandler(int port,
TransInterface.SocketHandler socketCallback)
Register socket handler. |
boolean |
checkSocketHandler(int port)
Return whether socket bound to port. |
void |
delSocketHandler(int port)
Unregister socket handler. |
void |
dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
Notification mechanism for packet dropped due to various "Reasons" |
TransInterface.TransTcpInterface |
getProxy()
Returns an entity reference to this object. |
void |
receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
Receive a message from network layer. |
void |
send(Message msg,
NetAddress dst,
int dstPort,
int srcPort,
byte priority)
Send message (from APPLICATON). |
void |
send(NetMessage msg)
Send a message through the routing protocol |
void |
setNetEntity(NetInterface netEntity)
Sets the reference to the network layer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransTcp()
| Method Detail |
|---|
public void send(NetMessage msg)
NetInterface.NetHandler
send in interface NetInterface.NetHandler
public void dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
NetInterface.NetHandler
dropNotify in interface NetInterface.NetHandlerpublic TransInterface.TransTcpInterface getProxy()
public void setNetEntity(NetInterface netEntity)
netEntity - entity reference to network layer
public void addSocketHandler(int port,
TransInterface.SocketHandler socketCallback)
addSocketHandler in interface TransInterfaceport - bound socket portsocketCallback - callback handlerpublic void delSocketHandler(int port)
delSocketHandler in interface TransInterfaceport - bound socket portpublic boolean checkSocketHandler(int port)
checkSocketHandler in interface TransInterface.TransTcpInterfaceport - port to check
public void receive(Message msg,
NetAddress src,
MacAddress lastHop,
byte macId,
NetAddress dst,
byte priority,
byte ttl)
receive in interface NetInterface.NetHandlermsg - message receivedsrc - source network addresslastHop - source link addressmacId - incoming interfacedst - destination network addresspriority - packet priorityttl - packet time-to-live
public void send(Message msg,
NetAddress dst,
int dstPort,
int srcPort,
byte priority)
send in interface TransInterfacemsg - packet payload (usually from application layer)dst - packet destination addressdstPort - packet destination portsrcPort - packet source portpriority - packet priority
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||