Examples of InetAddress


Examples of java.net.InetAddress

            // 24-10-2007 - added check if PORT or PASV is issued, see
            // https://issues.apache.org/jira/browse/FTPSERVER-110
            DataConnectionFactory connFactory = session.getDataConnection();
            if (connFactory instanceof IODataConnectionFactory) {
                InetAddress address = ((IODataConnectionFactory) connFactory)
                        .getInetAddress();
                if (address == null) {
                    session.write(new DefaultFtpReply(
                            FtpReply.REPLY_503_BAD_SEQUENCE_OF_COMMANDS,
                            "PORT or PASV must be issued first"));
View Full Code Here

Examples of java.net.InetAddress

           
            data += "You might need to modify the host address in the URL(s)" + NL + NL;
           
            try{
           
              InetAddress ia = AzureusCoreFactory.getSingleton().getInstanceManager().getMyInstance().getExternalAddress();
           
              if ( ia != null ){
               
                ip = IPToHostNameResolver.syncResolve( ia.getHostAddress(), 10000 );
              }
            }catch( Throwable e ){
             
            }
           
View Full Code Here

Examples of java.net.InetAddress

    List  result = new ArrayList();
   
    result.add( address );
   
    try{
      InetAddress ad = InetAddress.getByName( address );

      if ( isLANLocalAddress( address ) != LAN_LOCAL_NO ){

        if ( instance_manager == null ){
         
          try{
            instance_manager = AzureusCoreFactory.getSingleton().getInstanceManager();
           
          }catch( Throwable e ){
           
            Debug.printStackTrace(e);
          }
        }
       
        if ( instance_manager == null || !instance_manager.isInitialized()){
         
          return( result );
        }
     
        AZInstance[] instances = instance_manager.getOtherInstances();
       
        for (int i=0;i<instances.length;i++){
         
          AZInstance instance = instances[i];
         
          List addresses = instance.getInternalAddresses();
         
          if ( addresses.contains( ad )){
           
            for ( int j=0; j<addresses.size();j++){
             
              InetAddress ia = (InetAddress)addresses.get(j);
             
              String str = ia.getHostAddress();
             
              if ( !result.contains( str )){
               
                result.add( str );
              }
View Full Code Here

Examples of java.net.InetAddress

 
  public static byte
  isLANLocalAddress(
    InetSocketAddress  socket_address )
  {
    InetAddress address = socket_address.getAddress();
   
    return( isLANLocalAddress( address ));
  }
View Full Code Here

Examples of java.net.InetAddress

   *
   * @return null if no proper v6 address is found, best one otherwise
   */
  public static InetAddress pickBestGlobalV6Address(List<InetAddress> addrs)
  {
    InetAddress bestPick = null;
    int currentRanking = 0;
    for(InetAddress addr : addrs)
    {
      if(!isGlobalAddressV6(addr))
        continue;
View Full Code Here

Examples of java.net.InetAddress

            // 24-10-2007 - added check if PORT or PASV is issued, see
            // https://issues.apache.org/jira/browse/FTPSERVER-110
            DataConnectionFactory connFactory = session.getDataConnection();
            if (connFactory instanceof IODataConnectionFactory) {
                InetAddress address = ((IODataConnectionFactory) connFactory)
                        .getInetAddress();
                if (address == null) {
                    session.write(new DefaultFtpReply(
                            FtpReply.REPLY_503_BAD_SEQUENCE_OF_COMMANDS,
                            "PORT or PASV must be issued first"));
View Full Code Here

Examples of java.net.InetAddress

        try {

            InetSocketAddress dataConAddress = dataCon.initPassiveDataConnection();

            // get connection info
            InetAddress servAddr;
            if (externalPassiveAddress != null) {
                servAddr = resolveAddress(externalPassiveAddress);
            } else {
                servAddr = dataConAddress.getAddress();
            }
View Full Code Here

Examples of java.net.InetAddress

           
            // 24-10-2007 - added check if PORT or PASV is issued, see
            // https://issues.apache.org/jira/browse/FTPSERVER-110
            DataConnectionFactory connFactory = session.getDataConnection();
            if (connFactory instanceof IODataConnectionFactory) {
                InetAddress address = ((IODataConnectionFactory) connFactory)
                        .getInetAddress();
                if (address == null) {
                    session.write(new DefaultFtpReply(
                            FtpReply.REPLY_503_BAD_SEQUENCE_OF_COMMANDS,
                            "PORT or PASV must be issued first"));
View Full Code Here

Examples of java.net.InetAddress

            // 24-10-2007 - added check if PORT or PASV is issued, see
            // https://issues.apache.org/jira/browse/FTPSERVER-110
            DataConnectionFactory connFactory = session.getDataConnection();
            if (connFactory instanceof IODataConnectionFactory) {
                InetAddress address = ((IODataConnectionFactory) connFactory)
                        .getInetAddress();
                if (address == null) {
                    session.write(new DefaultFtpReply(
                            FtpReply.REPLY_503_BAD_SEQUENCE_OF_COMMANDS,
                            "PORT or PASV must be issued first"));
View Full Code Here

Examples of java.net.InetAddress

    if (localSocketAddress instanceof InetSocketAddress) {
      InetSocketAddress localInetSocketAddress = (InetSocketAddress) localSocketAddress;
      // server address
      if (varName.equals(SERVER_IP)) {

        InetAddress addr = localInetSocketAddress.getAddress();

        if (addr != null) {
          varVal = addr.getHostAddress();
        }
      }

      // server port
      else if (varName.equals(SERVER_PORT)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.