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

# CFSocketCopyRegisteredValue(_:_:_:_:_:)

Returns a value registered with a CFSocket name server.

```
func CFSocketCopyRegisteredValue(_ nameServerSignature: UnsafePointer<CFSocketSignature>!, _ timeout: CFTimeInterval, _ name: CFString!, _ value: UnsafeMutablePointer<Unmanaged<CFPropertyList>?>!, _ nameServerAddress: UnsafeMutablePointer<Unmanaged<CFData>?>!) -> CFSocketError
```

## Parameters

`nameServerSignature`

The socket signature for the name server. If `NULL`, this function contacts the default server, which is assumed to be a local process using TCP/IP to listen on the port number returned from [`CFSocketGetDefaultNameRegistryPortNumber()`](/documentation/CoreFoundation/CFSocketGetDefaultNameRegistryPortNumber()). If `nameServerSignature` is incomplete, the missing values are replaced with the default server’s values, if appropriate.

`timeout`

The time to wait for the server to accept a connection and to reply to the registration request.

`name`

The name of the registered value to return.

`value`

A pointer to the property list object into which the retrieved value should be copied.

`nameServerAddress`

A pointer to a CFData object into which the name server’s address is copied. Pass `NULL` if you do not want the server’s address.

## Return Value

An error code indicating success or failure.

## Discussion

---

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)