StreamReadable

public protocol StreamReadable

Protocol for a class which supports writing to a stream for custom network protocols.

  • Initialize an object implementing this protocol by reading data from the given stream.

    Throws

    An IOError if reading from the stream fails.

    Declaration

    Swift

    init(byReadingFrom stream: InputStream) throws

    Parameters

    stream

    Stream from which the data should be read.