public int open(){ InetAddress[] binds=this.binds; String[] bindAddresses; if(binds!=null){ bindAddresses = new String[binds.length]; for (int i = 0; i < binds.length; i++) { bindAddresses[i] = binds[i].getHostAddress(); } }else{ int nHostAddrs = HostInterface.getNHostAddresses(); bindAddresses = new String[nHostAddrs]; for (int n=0; n<nHostAddrs; n++) { bindAddresses[n] = HostInterface.getHostAddress(n); } } int j=0; for (int i = 0; i < bindAddresses.length; i++) { HTTPServer httpServer = new HTTPServer(); if((bindAddresses[i]==null) || (httpServer.open(bindAddresses[i], port) == false)) { close(); clear(); }else{ add(httpServer); j++; } } return j; }
public int open(){ InetAddress[] binds=this.binds; String[] bindAddresses; if(binds!=null){ bindAddresses = new String[binds.length]; for (int i = 0; i < binds.length; i++) { bindAddresses[i] = binds[i].getHostAddress(); } }else{ int nHostAddrs = HostInterface.getNHostAddresses(); bindAddresses = new String[nHostAddrs]; for (int n=0; n<nHostAddrs; n++) { bindAddresses[n] = HostInterface.getHostAddress(n); } } int j=0; for (int i = 0; i < bindAddresses.length; i++) { HTTPServer httpServer = new HTTPServer(); if((bindAddresses[i]==null) || (httpServer.open(bindAddresses[i], port) == false)) { close(); clear(); }else{ add(httpServer); j++; } } return j; }
public int open(){ InetAddress[] binds=this.binds; String[] bindAddresses; if(binds!=null){ bindAddresses = new String[binds.length]; for (int i = 0; i < binds.length; i++) { bindAddresses[i] = binds[i].getHostAddress(); } }else{ int nHostAddrs = HostInterface.getNHostAddresses(); bindAddresses = new String[nHostAddrs]; for (int n=0; n<nHostAddrs; n++) { bindAddresses[n] = HostInterface.getHostAddress(n); } } int j=0; for (int i = 0; i < bindAddresses.length; i++) { HTTPServer httpServer = new HTTPServer(); if((bindAddresses[i]==null) || (httpServer.open(bindAddresses[i], port) == false)) { close(); clear(); }else{ add(httpServer); j++; } } return j; }