<!--
{
  "documentType" : "article",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/stream-properties",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Stream Properties"
}
-->

# Stream Properties

Stream property names that can be set or copied.

## Discussion

Use [`CFReadStreamCopyProperty(_:_:)`](/documentation/CoreFoundation/CFReadStreamCopyProperty(_:_:)) or [`CFWriteStreamCopyProperty(_:_:)`](/documentation/CoreFoundation/CFWriteStreamCopyProperty(_:_:)) to read the property values. Use [`CFReadStreamSetProperty(_:_:_:)`](/documentation/CoreFoundation/CFReadStreamSetProperty(_:_:_:)) or [`CFWriteStreamSetProperty(_:_:_:)`](/documentation/CoreFoundation/CFWriteStreamSetProperty(_:_:_:)) to set the property values.

## Topics

### Constants

[`static let appendToFile: CFStreamPropertyKey!`](/documentation/CoreFoundation/CFStreamPropertyKey/appendToFile)

Value is a `CFBoolean` value that indicates whether to append the written data to a file, if it already exists, rather than to replace its contents.

[`static let dataWritten: CFStreamPropertyKey!`](/documentation/CoreFoundation/CFStreamPropertyKey/dataWritten)

Value is a `CFData` object that contains all the bytes written to a writable memory stream. You cannot modify this value.

[`static let fileCurrentOffset: CFStreamPropertyKey!`](/documentation/CoreFoundation/CFStreamPropertyKey/fileCurrentOffset)

Value is a `CFNumber` object containing the current file offset.

[`static let socketNativeHandle: CFStreamPropertyKey!`](/documentation/CoreFoundation/CFStreamPropertyKey/socketNativeHandle)

Value is a `CFData` object that contains the native handle for a socket stream—of type [`CFSocketNativeHandle`](/documentation/CoreFoundation/CFSocketNativeHandle)—to which the socket stream is connected.

[`static let socketRemoteHostName: CFStreamPropertyKey!`](/documentation/CoreFoundation/CFStreamPropertyKey/socketRemoteHostName)

Value is a `CFString` object containing the name of the host to which the socket stream is connected or `NULL` if unknown.

[`static let socketRemotePortNumber: CFStreamPropertyKey!`](/documentation/CoreFoundation/CFStreamPropertyKey/socketRemotePortNumber)

Value is a `CFNumber` object containing the remote port number to which the socket stream is connected or `NULL` if unknown.

[`let kCFStreamPropertyShouldCloseNativeSocket: CFString`](/documentation/CoreFoundation/kCFStreamPropertyShouldCloseNativeSocket)

Should Close Native Socket property key.

[`let kCFStreamPropertySocketSecurityLevel: CFString`](/documentation/CoreFoundation/kCFStreamPropertySocketSecurityLevel)

Socket Security Level property key.

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertySSLPeerCertificates>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertySSLPeerTrust>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertySSLSettings>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertySSLContext>

[`let kCFStreamPropertySOCKSProxy: CFString`](/documentation/CoreFoundation/kCFStreamPropertySOCKSProxy)

SOCKS proxy property key.

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertyProxyLocalBypass>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertySocketRemoteHost>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertySocketRemoteNetService>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamNetworkServiceType>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertyConnectionIsCellular>

  <doc://com.apple.documentation/documentation/CFNetwork/kCFStreamPropertyNoCellular>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)