Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
周四作业(可选):使用netty实现后端http访问(代替上一步骤);
  • Loading branch information
en-o committed Oct 31, 2020
commit d33e1cdf803eb377bd2c0cd93c36bc93eb43dccc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private String invoking(final FullHttpRequest inbound, final ChannelHandlerConte
}


// Response
private void handleResponse(final FullHttpRequest fullRequest, final ChannelHandlerContext ctx, final HttpResponse endpointResponse) throws Exception {
FullHttpResponse response = null;
try {
Expand Down Expand Up @@ -81,6 +82,7 @@ private void handleResponse(final FullHttpRequest fullRequest, final ChannelHand

}

// 关流
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
cause.printStackTrace();
ctx.close();
Expand Down