[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip Tcp.java, 1.68, 1.69 Telnet_client.java, 1.7,
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-09-05 14:59:57
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31605/core/protocolsuite/tcp_ip Modified Files: Tcp.java Telnet_client.java Log Message: Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** Tcp.java 4 Sep 2006 19:19:03 -0000 1.68 --- Tcp.java 5 Sep 2006 14:59:52 -0000 1.69 *************** *** 325,329 **** private Hashtable PortTable = new Hashtable(); private ProtocolStack mParentStack; ! private int window_size=25; // private int total_received=0; --- 325,329 ---- private Hashtable PortTable = new Hashtable(); private ProtocolStack mParentStack; ! private int window_size=2000; //25 // private int total_received=0; *************** *** 1834,1837 **** --- 1834,1838 ---- System.out.println(" [*** TCP ***] Pass upstairs call."); System.out.println(" [*** TCP ***] Last passed: " + Elm.last_passed + ", going to pass: " + kkey + "."); + System.out.println(" [*** TCP ***] Buffer isEmpty: " + Elm.OutputBuffer.isEmpty() + "."); System.out.println(" [*** TCP ***] While condition: " + Elm.OutputBuffer.containsKey(kkey) + "."); Index: Telnet_client.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Telnet_client.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Telnet_client.java 27 Feb 2006 00:49:09 -0000 1.7 --- Telnet_client.java 5 Sep 2006 14:59:52 -0000 1.8 *************** *** 36,39 **** --- 36,40 ---- private TelnetEmulator terminal; private int counts; + private boolean connected; /** Creates a new instance of Telnet Server */ *************** *** 42,45 **** --- 43,47 ---- mDevice = dev; counts = 0; + connected = false; } *************** *** 88,92 **** while (ConnectionAttempts>0 && clientPort==-1); ! if (clientPort>-1) return true; else return false; } --- 90,94 ---- while (ConnectionAttempts>0 && clientPort==-1); ! if (clientPort>-1){ connected = true; return true; }else{ connected = false; return false; } } *************** *** 110,113 **** --- 112,116 ---- public void DisconnectEvent(){ try{ + connected = false; Disconnect(); } *************** *** 120,124 **** printInfo("\nClient: receive disconnect event\n"); terminal.recvData("\nServer closed connection.\n"); ! terminal.recvData("\nQUIT"); } --- 123,127 ---- printInfo("\nClient: receive disconnect event\n"); terminal.recvData("\nServer closed connection.\n"); ! terminal.recvData("\nQUIT"); } *************** *** 130,133 **** --- 133,137 ---- public void Disconnect() throws TransportLayerException, LowLinkException{ + if(connected){ try { mParentStack.FinalizeTCP(this); //will close client connection *************** *** 143,146 **** --- 147,151 ---- mParentStack.CloseTCP(this); //mParentStack.freeTCPPort(this); + } } *************** *** 185,188 **** --- 190,194 ---- if(Data.compareTo("\nQUIT")==0) { + connected = false; Disconnect(); // terminal.recvData("Client: closing connection\n"); |