On Fri, 2003-10-03 at 22:15, Salah Coronya wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Just grabbed and compiled 6216 off CVS:
> 
> One of the new features is to list the port number in the "Open
> Connections" screen, but a few (1 or 2) have port 0 listed! I can't find
> ~ them anywhere in "netstat" either. (Incidentally, as a cosmetic effect,
> could the arrow and the port number be right-justified in the box?)

I was planning to make a new column for the port numbers...  Right
now, I wanted to be able to determine precisely which socket the
connection was using, and for that you need to know port numbers
on both systems.  For outgoing connections, you didn't have that.

        public int getLocalPort() {
                tcpConnection c = conn;
                java.net.Socket sock;
                if (c == null) return 0;
                try {
                        sock = conn.getSocket();
                } catch (IOException e) { 
                        sock = null; 
                }
                if(sock == null) return 0;
                return sock.getLocalPort();
        }

Port zero means either this instance of ConnectionHandler has
no TCP connection, (conn == null), or conn.getSocket threw an
IOException, or it returned null.  Didn't expect to see it.  
I'll fix it to return different values for three cases, maybe 
-1, -2, -3.
This change

        public int getLocalPort() {
                tcpConnection c = conn;
                java.net.Socket sock;
                if (c == null) return -1;
                try {
                        sock = conn.getSocket();
                } catch (IOException e) { 
                        return -2;
                }
                if(sock == null) return -3;
                return sock.getLocalPort();
        }

is committed, but it was merged with 6217 changes.

I've been watching netstat for connections with nonzero queues.
Many of them stay around for hours.  Some have nonzero input
queues:  no one is reading the data, which is ready.

-- Ed Huff

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to