Netty- some conclusions about the custom protocol development and consolidation

First, how to implement server-side framework

For the server, the problem to be solved are:

1, how to access and communicate more devices;

2, for accepting the connection is in what way? Asynchronous, synchronous, blocking or obstruction charges;

3, how to make this program more robust to ensure the long-run?

4, the issue of multi-threaded;

Second, on the encoder and the decoder issues

Third, on the communication protocol

1, the communication process, the client is to receive packets (binary stream) is converted into an object, the object is then received post service logic processing object converted to the feedback packet (binary stream) process;

 

Remaining problem:

1 and the relationship between channelread channelread0,;

2、ByteToMessageDecoder

ChannelInboundHandlerAdapter

SimpleChannelInboundHandler

fireChannelRead

 

to be continued. . .

 

Published 125 original articles · won praise 9 · views 30000 +

Guess you like

Origin blog.csdn.net/jiezhang656/article/details/105342776