Search in sources :

Example 1 with WebSocketAddOn

use of org.glassfish.grizzly.websockets.WebSocketAddOn 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");
}
Also used : PortRange(org.glassfish.grizzly.PortRange) WebSocketAddOn(org.glassfish.grizzly.websockets.WebSocketAddOn) NetworkListener(org.glassfish.grizzly.http.server.NetworkListener)

Example 2 with WebSocketAddOn

use of org.glassfish.grizzly.websockets.WebSocketAddOn 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");
}
Also used : PortRange(org.glassfish.grizzly.PortRange) WebSocketAddOn(org.glassfish.grizzly.websockets.WebSocketAddOn) NetworkListener(org.glassfish.grizzly.http.server.NetworkListener)

Aggregations

PortRange (org.glassfish.grizzly.PortRange)2 NetworkListener (org.glassfish.grizzly.http.server.NetworkListener)2 WebSocketAddOn (org.glassfish.grizzly.websockets.WebSocketAddOn)2