I have a problem with Apache mina and websocket communication.
The handshake works fine and I have a working connection with my server, but if my client sends a string to my server, the strings receive but I can't show them in console.
public void messageReceived(IoSession session, Object message) throws Exception {
System.out.println(message.toString());
if(message.toString().length() > 20 && message.toString().substring(0, 17).equals("Sec-WebSocket-Key")) {
new Thread(new WebsocketHandler(session, message)).start();
} else {
//
}}
My server log says that the message receives
INFO: RECEIVED: HeapBuffer[pos=0 lim=10 cap=2048: 81 84 88 45 2B 31 DC 00 78 65]
But I can't show the message, I think it's my TextLineCodecFactory filter but I don't know why.