diff --git a/README.md b/README.md index 70ba16c..22b7c65 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # NitroWebsockets ## What is NitroWebsockets? ## -NitroWebsockets is a plugin that adds Nitro HTML5 Client compatibility to any hotel running Arcturus MS 2.4.0 and above. +NitroWebsockets is a plugin that adds Nitro HTML5 Client compatibility to any hotel running Arcturus MS 2.5.0 and above. ## How do I configure the plugin? Startup the plugin so it generates the required entries under your `emulator_settings` table. The following fields will be generated: diff --git a/src/main/java/com/krews/plugin/nitro/websockets/NetworkChannelInitializer.java b/src/main/java/com/krews/plugin/nitro/websockets/NetworkChannelInitializer.java index 83843ab..d29021c 100644 --- a/src/main/java/com/krews/plugin/nitro/websockets/NetworkChannelInitializer.java +++ b/src/main/java/com/krews/plugin/nitro/websockets/NetworkChannelInitializer.java @@ -8,6 +8,7 @@ import com.krews.plugin.nitro.websockets.handlers.MessageInterceptorHandler; import io.netty.channel.ChannelInitializer; import io.netty.channel.socket.SocketChannel; import io.netty.handler.logging.LoggingHandler; +import io.netty.handler.timeout.IdleStateHandler; public class NetworkChannelInitializer extends ChannelInitializer { @@ -15,6 +16,9 @@ public class NetworkChannelInitializer extends ChannelInitializer public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast("logger", new LoggingHandler()); + ch.pipeline().addLast("idleStateHandler", new IdleStateHandler(60, 30, 0)); + ch.pipeline().addAfter("idleStateHandler", "idleEventHandler", new IdleTimeoutHandler()); + ch.pipeline().addLast("messageInterceptor", new MessageInterceptorHandler()); // Decoders.