com.github.tonivade.resp.protocol.RedisEncoder Maven / Gradle / Ivy
/*
* Copyright (c) 2015-2020, Antonio Gabriel Muñoz Conejo
* Distributed under the terms of the MIT License
*/
package com.github.tonivade.resp.protocol;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
public class RedisEncoder extends MessageToByteEncoder {
@Override
protected void encode(ChannelHandlerContext ctx, RedisToken msg, ByteBuf out) throws Exception {
out.writeBytes(new RedisSerializer().encodeToken(msg));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy