@Override
protected void decode(ChannelHandlerContext ctx, HttpObject msg, List<Object> out)
{
if(!added && msg instanceof HttpRequest)
{
String path = ((HttpRequest)msg).getUri();
WsServerHandler handler = findHandler(path);
if(handler != null)
{
ctx.pipeline().addAfter("switch", "aggregator", new HttpObjectAggregator(65536));
ctx.pipeline().addAfter("aggregator", "wsprotocol", new WebSocketServerProtocolHandler(path, null, true));
ctx.pipeline().addAfter("wsprotocol", "wshandler", new WsFrameHandler(handler));
added = true;
}
}
ReferenceCountUtil.retain(msg);
out.add(msg);
}
HttpWsSwitch.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:bridje-framework
作者:
评论列表
文章目录