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));
}
}
Aggregations