Home > Back-end >  Issue of netty channelread of programming
Issue of netty channelread of programming

Time:11-19

In the process of initialization

If you are using a pipeline. AddLast (new HttpServerCodec ()); To codec, the channelread is called twice, once return is HttpRequest, a return is HttpContent,

If you use the
Pipeline. AddLast (" decoder, "new StringDecoder (CharsetUtil. UTF_8));
Pipeline. AddLast (" encoder ", new StringEncoder (CharsetUtil. UTF_8));
The channelread is called only once, and returns the String types of data, contains the content of the Http headers and content, but the content can't convert the format of the HttpRequest,

Excuse me how can one-time all data is read out, is not call channelread twice, and makes the read data format for HttpRequest format,

Thank you very much!

CodePudding user response:

Take a look at this to learn can certainly pick up
https://github.com/joaoventura/full-speed-python
  • Related