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

# CFSocketRegisterSocketSignature(_:_:_:_:)

Registers a socket signature with a CFSocket name server.

```
func CFSocketRegisterSocketSignature(_ nameServerSignature: UnsafePointer<CFSocketSignature>!, _ timeout: CFTimeInterval, _ name: CFString!, _ signature: UnsafePointer<CFSocketSignature>!) -> 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 with which to register `signature`.

`signature`

The socket signature to register.

## Return Value

An error code indicating success or failure.

## Discussion

Once a socket signature is registered, other processes can retrieve it with [`CFSocketCopyRegisteredSocketSignature(_:_:_:_:_:)`](/documentation/CoreFoundation/CFSocketCopyRegisteredSocketSignature(_:_:_:_:_:)) and then open a connection to your socket using [`CFSocketCreateConnectedToSocketSignature(_:_:_:_:_:_:)`](/documentation/CoreFoundation/CFSocketCreateConnectedToSocketSignature(_:_:_:_:_:_:)).

To remove a registered socket signature from the name server, use [`CFSocketUnregister(_:_:_:)`](/documentation/CoreFoundation/CFSocketUnregister(_:_:_:)).

---

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)