Contents

getBoundStreams(withBufferSize:inputStream:outputStream:)

Creates and returns by reference a bound pair of input and output streams.

Declaration

class func getBoundStreams(withBufferSize bufferSize: Int, inputStream: AutoreleasingUnsafeMutablePointer<InputStream?>?, outputStream: AutoreleasingUnsafeMutablePointer<OutputStream?>?)

Parameters

  • bufferSize:

    The size of the buffer, in bytes, used to transfer data from inputStream to outputStream.

  • inputStream:

    On return, contains an input stream.

  • outputStream:

    On return, contains an output stream.

Mentioned in

Discussion

The created streams are bound to one another, such that any data written to outputStream is received by inputStream.

This is a convenience method for calling CFStreamCreateBoundPair(_:_:_:_:) and bridging from the returned Core Foundation types.

See Also

Related Documentation