문제

I can't seem to figure out how to send a simple string to the client. Every time I try it like this

@Override
public NextAction handleRead(FilterChainContext ctx) throws IOException {
    ctx.write("test");
    return ctx.getInvokeAction();
}

it throws an error:

java.lang.ClassCastException: java.lang.String cannot be cast to org.glassfish.grizzly.asyncqueue.WritableMessage

I tried implementing my own WritableMessage, which it then sends but it doesn't work. I can't figure out how to set it up properly, or if it's the right way.

도움이 되었습니까?
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top