mirror of
https://git.krews.org/morningstar/nitrowebsockets-for-ms
synced 2024-11-26 08:50:51 +01:00
added ping/pong timeout to pipeline. Updated readme
This commit is contained in:
parent
6c6d7aac64
commit
157adca762
@ -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:
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user