|
@@ -79,10 +79,10 @@ public class GroupNettyClient {
|
|
.handler(new ChannelInitializer<SocketChannel>() {
|
|
.handler(new ChannelInitializer<SocketChannel>() {
|
|
@Override
|
|
@Override
|
|
protected void initChannel(SocketChannel ch) throws Exception {
|
|
protected void initChannel(SocketChannel ch) throws Exception {
|
|
- ch.pipeline().addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 8, 0, 8));
|
|
+ ch.pipeline().addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4));
|
|
- ch.pipeline().addLast(new LengthFieldPrepender(8));
|
|
|
|
|
|
|
|
ch.pipeline().addLast(new StringDecoder());
|
|
ch.pipeline().addLast(new StringDecoder());
|
|
|
|
+ ch.pipeline().addLast(new LengthFieldPrepender(4));
|
|
ch.pipeline().addLast(new StringEncoder());
|
|
ch.pipeline().addLast(new StringEncoder());
|
|
|
|
|
|
ch.pipeline().addLast(new GroupNettyClientHandler(groupNettyClient, alarmDefineService, alarmRecordRepository));
|
|
ch.pipeline().addLast(new GroupNettyClientHandler(groupNettyClient, alarmDefineService, alarmRecordRepository));
|