@Override
protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(new ByteToMessageDecoder() {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
out.add(in.readBytes(in.readableBytes()));
}
});
pipeline.addLast(new StringEncoder());
pipeline.addLast(new StringDecoder());
pipeline.addLast(new ServerHandler(sqlSession));
}
ServerHandle class
private String message = "";
@Override@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
try {
message += (String)msg;
}catch (Exception e){
}
}
--
이 메일은 Google 그룹스 'Netty Korean User Group' 그룹에 가입한 분들에게 전송되는 메시지입니다.
이 그룹에서 탈퇴하고 더 이상 이메일을 받지 않으려면 netty-ko+u...@googlegroups.com에 이메일을 보내세요.
웹에서 이 토론을 보려면 https://groups.google.com/d/msgid/netty-ko/2f51ef25-ae97-44c5-9c14-3acb2f6d11c0n%40googlegroups.com을(를) 방문하세요.