同步获取响应数据

This commit is contained in:
Guoqs
2024-07-31 16:48:29 +08:00
parent a6d3cf3366
commit eed9a7bc2c
25 changed files with 590 additions and 276 deletions

View File

@@ -0,0 +1,19 @@
package rpc;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
public class ClientChannelInitializer extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
ChannelPipeline pipeline = socketChannel.pipeline();
pipeline.addLast(new MessageEncode());
pipeline.addLast(new MessageDecode());
pipeline.addLast(new RpcResponseHandler());
}
}