62,615
社区成员
发帖
与我相关
我的任务
分享
/**
* 有数据时触发
*/
@Override
protected void channelRead0(ChannelHandlerContext ctx, TextWebSocketFrame msg) throws Exception {
}
/**
* 建立连接后第一个执行
*/
@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
ctx.channel().writeAndFlush(new TextWebSocketFrame("hello world"));
}