---
title: "CFReadStreamCopyProperty(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfreadstreamcopyproperty(_:_:)"
---

# CFReadStreamCopyProperty(_:_:)

Returns the value of a property for a stream.

## Declaration

```swift
func CFReadStreamCopyProperty(_ stream: CFReadStream!, _ propertyName: CFStreamPropertyKey!) -> CFTypeRef!
```

## Parameters

- `stream`: The stream to examine.
- `propertyName`: The name of the stream property to obtain. The available properties for standard Core Foundation streams are listed in doc://com.apple.corefoundation/documentation/CoreFoundation/cfstream.

## Return Value

Return Value The value of the property propertyName. Ownership follows the The Create Rule.

## Discussion

Discussion Each type of stream can define a set of properties that either describe or configure individual streams. A property can be any information about a stream, other than the actual data the stream handles. Examples include the headers from an HTTP transmission, the expected number of bytes, file permission information, and so on. Use CFReadStreamSetProperty(_:_:_:) to modify the value of a property, although some properties are read-only.

## See Also

### Examining Stream Properties

- [CFReadStreamGetBuffer(_:_:_:)](corefoundation/cfreadstreamgetbuffer(_:_:_:).md)
- [CFReadStreamCopyError(_:)](corefoundation/cfreadstreamcopyerror(_:).md)
- [CFReadStreamGetError(_:)](corefoundation/cfreadstreamgeterror(_:).md)
- [CFReadStreamGetStatus(_:)](corefoundation/cfreadstreamgetstatus(_:).md)
- [CFReadStreamHasBytesAvailable(_:)](corefoundation/cfreadstreamhasbytesavailable(_:).md)
