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

# CFSocketUnregister(_:_:_:)

Unregisters a value or socket signature with a CFSocket name server.

```
func CFSocketUnregister(_ nameServerSignature: UnsafePointer<CFSocketSignature>!, _ timeout: CFTimeInterval, _ name: CFString!) -> 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 property-list value or socket signature to unregister.

## Return Value

An error code indicating success or failure.

## Discussion

The value being unregistered was previously registered with [`CFSocketRegisterValue(_:_:_:_:)`](/documentation/CoreFoundation/CFSocketRegisterValue(_:_:_:_:)) or [`CFSocketRegisterSocketSignature(_:_:_:_:)`](/documentation/CoreFoundation/CFSocketRegisterSocketSignature(_:_:_:_:)).

---

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)