IOData

public enum IOData

IOData unifies standard SwiftNIO types that are raw bytes of data; currently ByteBuffer and FileRegion.

Many ChannelHandlers receive or emit bytes and in most cases this can be either a ByteBuffer or a FileRegion from disk. To still form a well-typed ChannelPipeline such handlers should receive and emit value of type IOData.

  • Declaration

    Swift

    public static func ==(lhs: IOData, rhs: IOData) -> Bool
  • Returns the number of readable bytes in this IOData.

    Declaration

    Swift

    public var readableBytes: Int { get }
  • Move the readerIndex forward by offset.

    Declaration

    Swift

    public mutating func moveReaderIndex(forwardBy: Int)