Package java.net

Examples of java.net.InetSocketAddress$InetSocketAddressHolder


     
      if ( test_type.intValue() == TEST_TYPE_BT ){
       
        TCPNetworkManager tcp_man = TCPNetworkManager.getSingleton();
       
        InetSocketAddress adjusted_originator = adjustLoopback( originator );
       
        boolean  test = adjusted_originator.getAddress().isLoopbackAddress();
       
        if (   test ||
            tcp_man.isTCPListenerEnabled() &&
              tcp_man.getTCPListeningPortNumber() == ddb.getLocalContact().getAddress().getPort() &&
              SystemTime.getCurrentTime() - tcp_man.getLastIncomingNonLocalConnectionTime() <= 24*60*60*1000 )){
View Full Code Here


                    Socket socket = new Socket();
                   
                    String  result = a_str;
                   
                    try{
                      socket.bind( new InetSocketAddress( ia, 0 ));
                                               
                      socket.connectnew InetSocketAddress( "www.google.com", 80 ), 10*1000 );
                     
                      result += "*";
                     
                    }catch( Throwable e ){
                     
View Full Code Here

    }
   
    try{
      this_mon.enter();
      InetSocketAddress  int_tcp = new InetSocketAddress(internal_address, tcp);
      InetSocketAddress  ext_tcp = new InetSocketAddress(external_address, tcp);
      InetSocketAddress  int_udp = new InetSocketAddress(internal_address, udp);
      InetSocketAddress  ext_udp = new InetSocketAddress(external_address, udp);
      InetSocketAddress  int_udp2 = new InetSocketAddress(internal_address, udp2);
      InetSocketAddress  ext_udp2 = new InetSocketAddress(external_address, udp2);

        // not the most efficient code in the world this... will need rev
     
      tcp_ext_to_lan   = modifyAddress( tcp_ext_to_lan, ext_tcp, int_tcp, add );
      tcp_lan_to_ext   = modifyAddress( tcp_lan_to_ext, int_tcp, ext_tcp, add );
View Full Code Here

    InetSocketAddress  value,
    boolean        add )
  {
    // System.out.println( "ModAddress: " + key + " -> " + value + " - " + (add?"add":"remove"));
   
    InetSocketAddress  old_value = (InetSocketAddress)map.get(key);

    boolean  same = old_value != null && old_value.equals( value );
   
    Map  new_map = map;
   
    if ( add ){
     
View Full Code Here

  protected boolean
  addInstanceSupport(
    InetAddress      explicit_address,
    boolean        force_send_alive )
  {
    final InetSocketAddress  sad = new InetSocketAddress( explicit_address, MC_GROUP_PORT );
   
    boolean  new_peer = false;
   
    if ( !explicit_peers.contains( sad )){
     
View Full Code Here

    if ( ip == null ){
     
      return( null );
    }
   
    InetSocketAddress address = new InetSocketAddress( ip, tcp_port );
   
    InetSocketAddress adjusted_address = AddressUtils.adjustTCPAddress( address, true );
   
    if ( adjusted_address != address ){
     
      return( adjusted_address.getAddress());
    }
   
    address = new InetSocketAddress( ip, udp_port );
   
    adjusted_address = AddressUtils.adjustUDPAddress( address, true );
   
    if ( adjusted_address != address ){
     
      return( adjusted_address.getAddress());
    }
 
    return( ip );
  }
View Full Code Here

    if ( ip == null ){
           
      throw( new BuddyPluginException( "Friend offline (no usable IP address)" ));
    }
   
    InetSocketAddress  tcp_target  = null;
    InetSocketAddress  udp_target  = null;
   
    int  tcp_port = getTCPPort();
   
    if ( tcp_port > 0 ){
     
      tcp_target = new InetSocketAddress( ip, tcp_port );
    }
   
    int  udp_port = getUDPPort();
   
    if ( udp_port > 0 ){
     
      udp_target = new InetSocketAddress( ip, udp_port );
    }

    InetSocketAddress  notional_target = tcp_target;
   
    if ( notional_target == null ){
   
      notional_target = udp_target;
    }
View Full Code Here

                            String  host = rhs.substring(0,pos);
                            int    port = Integer.parseInt( rhs.substring(pos+1));
                           
                            contact =
                                transport.importContact(
                                    new InetSocketAddress( host, port ),
                                    transport.getProtocolVersion());
                          }
                         
                          log.log( "Stats request to " + contact.getName());
                         
View Full Code Here

   
    for (int i=0;i<protocols.length;i++){

      ProtocolEndpoint ep = protocols[i];
     
      InetSocketAddress address = ep.getAdjustedAddress( true );
     
      ProtocolEndpointFactory.createEndpoint( ep.getType(), result, address );
    }
   
    return( result );
View Full Code Here

    int        port )
 
  {
    try{
      return(
        transport.importContact( new InetSocketAddress(ia, port ), protocol_version ));
   
    }catch( Throwable e ){
     
      log.log(e);
     
View Full Code Here

TOP

Related Classes of java.net.InetSocketAddress$InetSocketAddressHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.