As shown below I can read the byte[] sent from an IoSession without having a protocol decoder.
IoBuffer in = (IoBuffer) message;
byte[] inBytes = in.array();
int length = inBytes[0];
inBytes = Arrays.copyOfRange(inBytes, 1, length + 1);
ByteString incomingMessage = ByteString.copyFrom(inBytes);
But when I try to do:
someIoSession.write(incomingMessage.toByteArray());
I get the following error.
Don't know how to handle message of type XXXX. Are you missing a protocol encoder?
How can I just write the bytes into an IoSession?