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, dbkr at freenetproject.org 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 - toad at amphibian.dyndns.org
> > Freenet Project Official Codemonkey - http://freenetproject.org/
> > ICTHUS - Nothing is impossible. Our Boss says so.
> >
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
--
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20060502/910de9ae/attachment.pgp>