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; }
private boolean stop(boolean doByeBye) { if (doByeBye == true) byebye(); HTTPServerList httpServerList = getHTTPServerList(); httpServerList.stop(); httpServerList.close(); httpServerList.clear(); SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList(); ssdpSearchSockList.stop(); ssdpSearchSockList.close(); ssdpSearchSockList.clear(); Advertiser adv = getAdvertiser(); if (adv != null) { adv.stop(); setAdvertiser(null); } return true; }
httpServerList.close(); httpServerList.clear();
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; }
httpServerList.close(); httpServerList.clear();
private boolean stop(boolean doByeBye) { if (doByeBye == true) byebye(); HTTPServerList httpServerList = getHTTPServerList(); httpServerList.stop(); httpServerList.close(); httpServerList.clear(); SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList(); ssdpSearchSockList.stop(); ssdpSearchSockList.close(); ssdpSearchSockList.clear(); Advertiser adv = getAdvertiser(); if (adv != null) { adv.stop(); setAdvertiser(null); } return true; }
private boolean stop(boolean doByeBye) { if (doByeBye == true) byebye(); HTTPServerList httpServerList = getHTTPServerList(); httpServerList.stop(); httpServerList.close(); httpServerList.clear(); SSDPSearchSocketList ssdpSearchSockList = getSSDPSearchSocketList(); ssdpSearchSockList.stop(); ssdpSearchSockList.close(); ssdpSearchSockList.clear(); Advertiser adv = getAdvertiser(); if (adv != null) { adv.stop(); setAdvertiser(null); } return true; }
httpServerList.close(); httpServerList.clear();