I noticed this chunk of code in the constructor for DatagramSessionImpl
after realizing getLocalAddress didn't return the local address at all:

       // We didn't set the localhost by calling getLocalSocketAddress() to
avoid
       // the case that getLocalSocketAddress() returns IPv6 address while
       // serviceAddress represents the same address in IPv4.
       this.localAddress = this.serviceAddress = serviceAddress;

Is there any way I can get the local address for a UDP session without
compiling my own version?

Thanks a lot!

-Adam

Reply via email to