---
title: "getBoundStreams(withBufferSize:inputStream:outputStream:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/stream/getboundstreams(withbuffersize:inputstream:outputstream:)"
---

# getBoundStreams(withBufferSize:inputStream:outputStream:)

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

## Declaration

```swift
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

Uploading streams of data

## Discussion

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

- [CFStreamCreateBoundPair(_:_:_:_:)](corefoundation/cfstreamcreateboundpair(_:_:_:_:).md)
