51,396
社区成员




protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
//解码用
p.addLast("frameDecoder", new ProtobufVarint32FrameDecoder());
//构造函数传递要解码成的类型 这里如果再有一个LocalDates的话应该怎么处理
p.addLast("protobufDecoder", new ProtobufDecoder(LocalTimeProtocol.LocalTimes.getDefaultInstance()));
//编码用
p.addLast("frameEncoder", new ProtobufVarint32LengthFieldPrepender());
p.addLast("protobufEncoder", new ProtobufEncoder());
//业务逻辑用 这里如果再有一个LocalDateClientHandler的话应该怎么处理
p.addLast("handler", new LocalTimeClientHandler());
}
if (arg1 instanceof Localtime){}
else if (arg1 instancdof LocalDate){}