public final class HTTPServerUpgradeHandler : ChannelInboundHandler, RemovableChannelHandler

A server-side channel handler that receives HTTP requests and optionally performs a HTTP-upgrade. Removes itself from the channel pipeline after the first inbound request on the connection, regardless of whether the upgrade succeeded or not.

This handler behaves a bit differently from its Netty counterpart because it does not allow upgrade on any request but the first on a connection. This is primarily to handle clients that pipeline: it’s sufficiently difficult to ensure that the upgrade happens at a safe time while dealing with pipelined requests that we choose to punt on it entirely and not allow it. As it happens this is mostly fine: the odds of someone needing to upgrade midway through the lifetime of a connection are very low.