Search in sources :

Example 1 with NetworkHandler

use of act.xio.NetworkHandler in project actframework by actframework.

the class Act method hook.

public static void hook(App app) {
    int port = app.config().httpPort();
    NetworkHandler networkHandler = new NetworkHandler(app);
    network.register(port, false, networkHandler);
    if (app.config().supportSsl()) {
        network.register(appConfig().httpsPort(), true, networkHandler);
    }
    List<NamedPort> portList = app.config().namedPorts();
    for (NamedPort np : portList) {
        network.register(np.port(), false, new NetworkHandler(app, np));
    }
}
Also used : NamedPort(act.app.util.NamedPort) NetworkHandler(act.xio.NetworkHandler)

Aggregations

NamedPort (act.app.util.NamedPort)1 NetworkHandler (act.xio.NetworkHandler)1