When creating my Mina Server, I specify this:

    this.acceptor = new NioSocketAcceptor();

    this.acceptor.getFilterChain().addLast("logger", new LoggingFilter());
    this.acceptor.getFilterChain().addLast("webSocketCodec", new
ProtocolCodecFilter(new WebSocketCodecFactory()));
    this.acceptor.getFilterChain().addLast("binaryCodec", new
ProtocolCodecFilter(new DefaultCodecFactory()));

The webSocketCodec is one that handles WebSocket handshake stuff. The
binaryCodec is the one that parses custom binary protocol messages.

In this setup, I expect the following:

client sends data -> webSocketCodec.encode -> binaryCodec.encode
server writes data -> binaryCodec.encode -> webSocketCodec.encode

Unfortunately, only the first step of each flow is called. What am I doing
wrong? Can't I use to Protocol Codec Filters after each other?

Reply via email to