use of org.glassfish.grizzly.PortRange in project dukescript-presenters by dukescript.
the class DynamicHTTP method initServer.
static URI initServer() throws Exception {
server = HttpServer.createSimpleServer(null, new PortRange(8080, 65535));
final WebSocketAddOn addon = new WebSocketAddOn();
for (NetworkListener listener : server.getListeners()) {
listener.registerAddOn(addon);
}
resources = new ArrayList<Resource>();
conf = server.getServerConfiguration();
final DynamicHTTP dh = new DynamicHTTP();
conf.addHttpHandler(dh, "/");
server.start();
return pageURL("http", server, "/test.html");
}
use of org.glassfish.grizzly.PortRange in project dukescript-presenters by dukescript.
the class DynamicHTTP method initServer.
static URI initServer() throws Exception {
server = HttpServer.createSimpleServer(null, new PortRange(8080, 65535));
final WebSocketAddOn addon = new WebSocketAddOn();
for (NetworkListener listener : server.getListeners()) {
listener.registerAddOn(addon);
}
resources = new ArrayList<Resource>();
conf = server.getServerConfiguration();
final DynamicHTTP dh = new DynamicHTTP();
conf.addHttpHandler(dh, "/");
server.start();
return pageURL("http", server, "/test.html");
}
use of org.glassfish.grizzly.PortRange in project dukescript-presenters by dukescript.
the class Browser method server.
private static HttpServer server(RootPage r) {
int from = 8080;
int to = 65535;
// NOI18N
String port = System.getProperty("com.dukescript.presenters.browserPort");
if (port != null) {
from = to = Integer.parseInt(port);
}
HttpServer s = HttpServer.createSimpleServer(null, new PortRange(from, to));
final ServerConfiguration conf = s.getServerConfiguration();
conf.addHttpHandler(r, "/");
return s;
}
Aggregations