Code example for InetSocketAddress

Methods: toString

0
    * @param sdpAddress 
    */ 
   void gotSdp(InetSocketAddress sdpAddress)
   { 
      LOG.debug(String.format("Leg::gotSdp %s got remote RTP address %s%n", myId, 
            sdpAddress.toString()));
      if (remoteRtpAddress == null)
      { 
         previousRtpAddress = remoteRtpAddress ;
         remoteRtpAddress = sdpAddress ;
      } 
      else 
      { 
         if (remoteRtpAddress.equals(sdpAddress))
         { 
            LOG.debug(String.format("Leg::gotSdp %s already knows remote RTP address %s%n", 
                  myId, sdpAddress.toString()));
         } 
         else 
         { 
            LOG.debug(String.format("Leg::gotSdp %s switching remote RTP address %s to %s%n", 
                  myId, remoteRtpAddress, sdpAddress.toString()));
            previousRtpAddress = remoteRtpAddress ;
            remoteRtpAddress = sdpAddress ;
         } 
      } 
   }