|Modifier and Type||Method and Description|
Gets all protocol-specific headers required by this protocol for a successful upgrade.
Performs an HTTP protocol upgrade from the source codec.
HttpHeaderNames.CONNECTIONheader as well.
boolean prepareUpgradeResponse(ChannelHandlerContext ctx, FullHttpRequest upgradeRequest, HttpHeaders upgradeHeaders)
upgradeHeadersfor a protocol update based upon the contents of
upgradeRequest. This method returns a boolean value to proceed or abort the upgrade in progress. If
falseis returned, the upgrade is aborted and the
upgradeRequestwill be passed through the inbound pipeline as if no upgrade was performed. If
trueis returned, the upgrade will proceed to the next step which invokes
upgradeTo(io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.http.FullHttpRequest). When returning
true, you can add headers to the
upgradeHeadersso that they are added to the 101 Switching protocols response.
void upgradeTo(ChannelHandlerContext ctx, FullHttpRequest upgradeRequest)
ctx- the context for the current handler.
upgradeRequest- the request that triggered the upgrade to this protocol.
Copyright © 2008–2020 The Netty Project. All rights reserved.