[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip Application.java,1.10,1.11 Echo.java,1.11,1.12
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2005-11-20 21:06:58
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7498/core/protocolsuite/tcp_ip Modified Files: Application.java Echo.java Udp.java Log Message: Fixed UDP Error in Exceptions Index: Application.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Application.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Application.java 20 Nov 2005 20:30:53 -0000 1.10 --- Application.java 20 Nov 2005 21:06:50 -0000 1.11 *************** *** 105,114 **** } - /** - * This method totally disconnects from server. - * @author gift (sourceforge user) - * @version v0.01 - */ - - public abstract void TotalDisconnect()throws TransportLayerException; } --- 105,107 ---- Index: Udp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Udp.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Udp.java 20 Nov 2005 20:30:53 -0000 1.20 --- Udp.java 20 Nov 2005 21:06:50 -0000 1.21 *************** *** 458,462 **** Elm=(UDP_HashTableElement) PortTable.get((Integer)PortToClose); ! if (Elm.PortStatus==1) { //UDP_HashTableElement Elm = new UDP_HashTableElement(); --- 458,462 ---- Elm=(UDP_HashTableElement) PortTable.get((Integer)PortToClose); ! if (Elm.PortStatus==1 || (Elm.PortStatus==2 && PortToClose<PORT_START_NUMBER)) { //UDP_HashTableElement Elm = new UDP_HashTableElement(); *************** *** 512,515 **** --- 512,516 ---- { UDP_HashTableElement Elm=null; + try{ Integer PortToFree=getApplicationLocalPortNumber(application); *************** *** 520,524 **** Elm.connectedtoIP=""; Elm.connectedtoPort=0; ! } --- 521,525 ---- Elm.connectedtoIP=""; Elm.connectedtoPort=0; ! }catch(Exception e){} } Index: Echo.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Echo.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Echo.java 20 Nov 2005 20:30:53 -0000 1.11 --- Echo.java 20 Nov 2005 21:06:50 -0000 1.12 *************** *** 90,103 **** } ! /** ! * This method disconnects from server. ! * @author key ! * @version v0.01 ! */ ! ! public void TotalDisconnect() throws TransportLayerException { ! mParentStack.FreeUDPApplication(this); ! } ! /** * This method sends data to the other side. --- 90,94 ---- } ! /** * This method sends data to the other side. *************** *** 185,189 **** */ public void SendEcho(String Data, String Host, int port) throws CommunicationException, LowLinkException, InvalidNetworkLayerDeviceException, TransportLayerException{ ! TotalDisconnect(); ClientConnect(Host, port); --- 176,181 ---- */ public void SendEcho(String Data, String Host, int port) throws CommunicationException, LowLinkException, InvalidNetworkLayerDeviceException, TransportLayerException{ ! mParentStack.FreeUDPApplication(this); ! ClientConnect(Host, port); |