E
E
Egor2021-11-24 12:43:04
Java
Egor, 2021-11-24 12:43:04

How to send objects to the Netty server and receive them in return?

Hello, I need help sending requests to the server. I have both a client and a server part of the project on netty and I need to understand how to send requests NOT from a handler with SimpleChannelInboundHandler the debugger does not provide any information about what is walking through the channels. Further, I tried to rewrite the client to NIO, which also did not bring the necessary results, an IOException error, packets were sent and not received, and the server reported that the client was forcibly disconnected. I am attaching the code. Everything is here https://github.com/Renaon/CloudCommander

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor, 2022-02-27
@failure_knight

For those who have the same problem:
You just need to override this method and everything will be fine

@Override
    public boolean acceptInboundMessage(Object msg) throws Exception {
        return super.acceptInboundMessage(msg);
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question