use of io.dingodb.net.netty.channel.impl.SimpleChannelId in project dingo by dingodb.
the class MessageDecoder method readChannelId.
private static ChannelId readChannelId(ByteBuf buf) {
Integer len = Serializers.readVarInt(buf);
if (len == null) {
throw new CorruptedFrameException("Invalid channel id len: null.");
}
if (len == 0) {
return null;
}
byte[] bytes = new byte[len];
buf.readBytes(bytes);
return new SimpleChannelId().load(bytes);
}
Aggregations