HTTPDecoder

public class HTTPDecoder<HTTPMessageT> : ByteToMessageDecoder, AnyHTTPDecoder

A ChannelInboundHandler that parses HTTP/1-style messages, converting them from unstructured bytes to a sequence of HTTP messages.

The HTTPDecoder is a generic channel handler which can produce messages in either the form of HTTPClientResponsePart or HTTPServerRequestPart: that is, it produces messages that correspond to the semantic units of HTTP produced by the remote peer.

  • Declaration

    Swift

    public func handlerRemoved(ctx: ChannelHandlerContext)
  • Declaration

    Swift

    public func decoderAdded(ctx: ChannelHandlerContext)
  • Declaration

    Swift

    public func channelRead(ctx: ChannelHandlerContext, data: NIOAny)
  • This method should not be called and will be removed in the future

    Declaration

    Swift

    public func decode(ctx: ChannelHandlerContext, buffer: inout ByteBuffer) throws -> DecodingState
  • Declaration

    Swift

    public func channelReadComplete(ctx: ChannelHandlerContext)
  • Declaration

    Swift

    public func channelInactive(ctx: ChannelHandlerContext)
  • Declaration

    Swift

    public func userInboundEventTriggered(ctx: ChannelHandlerContext, event: Any)
  • Declaration

    Swift

    public func errorCaught(ctx: ChannelHandlerContext, error: Error)
  • Declaration

    Swift

    public var cumulationBuffer: ByteBuffer? { get set }