@Spi(scope=PROTOTYPE) public interface Codec
| Modifier and Type | Method and Description |
|---|---|
Object |
decode(Channel channel,
String remoteIp,
byte[] buffer) |
byte[] |
encode(Channel channel,
Object message) |
byte[] encode(Channel channel, Object message) throws IOException
IOExceptionObject decode(Channel channel, String remoteIp, byte[] buffer) throws IOException
channel - remoteIp - 用来在server端decode request时能获取到client的ip。buffer - IOExceptionCopyright © 2019. All rights reserved.