NettyHttpFileHandler.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:TFWebSock 作者:
public void sendRedirect(ChannelHandlerContext ctx, String newUri) {
   FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.FOUND);
   response.headers().set(HttpHeaders.Names.LOCATION, newUri);

   // Close the connection as soon as the error message is sent.
   ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号