src/net.cpp
// get best local address for a particular peer as a CAddress
// Otherwise, return the unroutable 0.0.0.0 but filled in with
// the normal parameters, since the IP may be changed to a useful
// one by discovery.
get best local address for a particular peer as a CAddress
Otherwise, return the unroutable 0.0.0.0 but filled in with
the normal parameters, since the IP may be changed to a useful
one by discovery.
get best local address for a particular peer as a CAddress Otherwise return the unroutable 0 . 0 . 0 . 0 but filled in with the normal parameters since the IP may be changed to a useful one by discovery .
CAddress GetLocalAddress(const CNetAddr *paddrPeer)
{
    CAddress ret(CService("0.0.0.0",GetListenPort()), NODE_NONE);
    CService addr;
    if (GetLocal(addr, paddrPeer))
    {
        ret = CAddress(addr, nLocalServices);
    }
    ret.nTime = GetAdjustedTime();
    return ret;
}
CAddress GetLocalAddress ( const CNetAddr * paddrPeer ) { CAddress ret ( CService ( " " , GetListenPort ( ) ) , NODE_NONE ) ; CService addr ; if ( GetLocal ( addr , paddrPeer ) ) { ret = CAddress ( addr , nLocalServices ) ; } ret . nTime = GetAdjustedTime ( ) ; return ret ; }
get best local address for a particular peer as a CAddress
Otherwise, return the unroutable 0.0.0.0 but filled in with
the normal parameters, since the IP may be changed to a useful
one by discovery.
get best local address for a particular peer as a CAddress Otherwise return the unroutable 0 . 0 . 0 . 0 but filled in with the normal parameters since the IP may be changed to a useful one by discovery .