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 ??




--
View this message in context: 
http://apache-mina.10907.n7.nabble.com/How-to-write-byte-to-an-IoSession-tp41542.html
Sent from the Apache MINA User Forum mailing list archive at Nabble.com.

Reply via email to