com.cloud.platform.web.netty.decode.SmartDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloud-web-spring-boot-starter Show documentation
Show all versions of cloud-web-spring-boot-starter Show documentation
project for cloud-web-spring-boot-starter
The newest version!
package com.cloud.platform.web.netty.decode;
import com.cloud.platform.common.constants.PlatformCommonConstant;
import com.cloud.platform.web.netty.protocol.SmartProtocol;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import java.util.List;
/**
* @Description:
* @Author: ZhouShuai
* @Date: 2021-07-14 21:04
*/
public class SmartDecoder extends ByteToMessageDecoder {
/**
*
* 协议开始的标准head_data,int类型,占据4个字节.
* 表示数据的长度contentLength,int类型,占据4个字节.
*
*/
public final int BASE_LENGTH = 4 + 4;
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf buffer, List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy