Well my concern is which gets called in logging/toString(); I think it's
getDetectedPeer...

On Tue, May 02, 2006 at 05:21:56PM +0100, Dave Baker wrote:
> As is my understanding, the detected peer is used once the handshake is 
> completed, so the address is used directly there. The official peer (the one 
> constructed from the physical.udp line of the reference, right?) is kept, but 
> since it's only used for sending handshakes to, we probably do want to do a 
> lookup each time we use it (taking into the account the fact that the DNS 
> lookups will be cached for 5 minutes anyway).
> 
> Seem okay?
> 
> 
> Dave
> 
> 
> On Tuesday 02 May 2006 15:49, Matthew Toseland wrote:
> > Are you sure? Which peer is constructed from an IP address? The detected
> > peer certainly, but we keep the official peer as well... that isn't
> > often looked at?
> > 
> > On Mon, May 01, 2006 at 09:57:14PM +0000, [EMAIL PROTECTED] wrote:
> > > -         return _address;
> > > +         if (_address != null) {
> > > +                 return _address;
> > > +         } else {
> > > +                 /* 
> > > +                  * Peers are constructed from an address once
> > > +                  * a handshake has been completed, so this
> > > +                  * lookup will only be performed during a 
> > > +                  * handshake - it doesn't mean we perform
> > > +                  * a DNS lookup with every packet we send.
> > > +                  */
> > > +                 try {
> > > +                         return InetAddress.getByName(hostname);
> > > +                 } catch (UnknownHostException e) {
> > > +                         return null;
> > > +                 }
> > > +         }
> > >   }
> > -- 
> > Matthew J Toseland - [EMAIL PROTECTED]
> > Freenet Project Official Codemonkey - http://freenetproject.org/
> > ICTHUS - Nothing is impossible. Our Boss says so.
> > 
> _______________________________________________
> Devl mailing list
> [email protected]
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> 

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to