<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFStreamPropertyKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@T@CFStreamPropertyKey"
  },
  "title" : "CFStreamPropertyKey"
}
-->

# CFStreamPropertyKey

```
struct CFStreamPropertyKey
```

## Topics

### Type Properties

[`appendToFile`](/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.

[`dataWritten`](/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.

[`fileCurrentOffset`](/documentation/CoreFoundation/CFStreamPropertyKey/fileCurrentOffset)

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

[`socketNativeHandle`](/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.

[`socketRemoteHostName`](/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.

[`socketRemotePortNumber`](/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.



---

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)