public HTTPServerList getHTTPServerList() { if(this.httpServerList==null){ this.httpServerList = new HTTPServerList(this.httpBinds,this.httpPort); } return this.httpServerList; }
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 HTTPServer getHTTPServer(int n) { return (HTTPServer)get(n); }
public void close() { int nServers = size(); for (int n=0; n<nServers; n++) { HTTPServer server = getHTTPServer(n); server.close(); } }
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; }
int bindPort = getHTTPPort(); HTTPServerList httpServerList = getHTTPServerList(); while (httpServerList.open(bindPort) == false) { retryCnt++; if (UPnP.SERVER_RETRY_COUNT < retryCnt) bindPort = getHTTPPort(); httpServerList.addRequestListener(this); httpServerList.start();
public boolean open(int port) { this.port=port; return open()!=0; }
int bindPort = getHTTPPort(); HTTPServerList httpServerList = getHTTPServerList(); while (httpServerList.open(bindPort) == false) { retryCnt++; if (UPnP.SERVER_RETRY_COUNT < retryCnt) { bindPort = getHTTPPort(); httpServerList.addRequestListener(this); httpServerList.start();
public void start() { int nServers = size(); for (int n=0; n<nServers; n++) { HTTPServer server = getHTTPServer(n); server.start(); } }
public boolean open(int port) { this.port=port; return open()!=0; }
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; }
int bindPort = getHTTPPort(); HTTPServerList httpServerList = getHTTPServerList(); while (httpServerList.open(bindPort) == false) { retryCnt++; if (UPnP.SERVER_RETRY_COUNT < retryCnt) bindPort = getHTTPPort(); httpServerList.addRequestListener(this); httpServerList.start();
public void stop() { int nServers = size(); for (int n=0; n<nServers; n++) { HTTPServer server = getHTTPServer(n); server.stop(); } }
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 boolean open(int port) { this.port=port; return open()!=0; }
public HTTPServerList getHTTPServerList() { if(this.httpServerList==null){ this.httpServerList = new HTTPServerList(this.httpBinds,this.httpPort); } return this.httpServerList; }
public HTTPServer getHTTPServer(int n) { return (HTTPServer)get(n); }
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; }
int bindPort = getHTTPPort(); HTTPServerList httpServerList = getHTTPServerList(); while (httpServerList.open(bindPort) == false) { retryCnt++; if (UPnP.SERVER_RETRY_COUNT < retryCnt) bindPort = getHTTPPort(); httpServerList.addRequestListener(this); httpServerList.start();