This commit is contained in:
Guoqs
2024-08-01 10:54:13 +08:00
parent 7294d82a7e
commit c16081feda
16 changed files with 16 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
package com.jsowell.netty.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());
}
}