MimeStreamWriter

open class MimeStreamWriter : ByteStream, @unchecked Sendable

Stream for writing MIME multipart/mixed messages.

See also

RFC 2046.
  • Declaration

    Swift

    override open func close() throws
  • Declaration

    Swift

    open func nestedStream() throws -> MimeStreamWriter

    Return Value

    a new MIME stream writer for a nested multipart/mixed message.

  • Declaration

    Swift

    open class func newMultipart(boundary: String, stream: ByteStream) -> MimeStreamWriter

    Parameters

    boundary

    MIME part boundary.

    stream

    MIME output stream.

    Return Value

    a new MIME stream writer for an outer multipart/mixed message.

  • Declaration

    Swift

    override open func writeBinary(data: Data) throws
  • Declaration

    Swift

    override open func writeByte(_ value: Int) throws
  • Write a MIME part to the stream, excluding part content which the caller should write with writeByte and/or writeBinary calls.

    Declaration

    Swift

    open func writePart(_ part: MimePart) throws

    Parameters

    part

    MIME part, where one of MimePart.isMultipart, MimePart.isRequest, or MimePart.isResponse must be true.