added ping/pong timeout to pipeline. Updated readme

This commit is contained in:
Dank074 2020-10-13 01:09:12 -05:00
parent 6c6d7aac64
commit 157adca762
2 changed files with 5 additions and 1 deletions

View File

@ -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:

View File

@ -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<SocketChannel> {
@ -15,6 +16,9 @@ public class NetworkChannelInitializer extends ChannelInitializer<SocketChannel>
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.