---
title: "CFSocketCopyRegisteredSocketSignature(_:_:_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfsocketcopyregisteredsocketsignature(_:_:_:_:_:)"
---

# CFSocketCopyRegisteredSocketSignature(_:_:_:_:_:)

Returns a socket signature registered with a CFSocket name server.

## Declaration

```swift
func CFSocketCopyRegisteredSocketSignature(_ nameServerSignature: UnsafePointer<CFSocketSignature>!, _ timeout: CFTimeInterval, _ name: CFString!, _ signature: UnsafeMutablePointer<CFSocketSignature>!, _ 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 doc://com.apple.corefoundation/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 socket signature to retrieve.
- `signature`: A pointer to a doc://com.apple.corefoundation/documentation/CoreFoundation/CFSocketSignature structure into which the retrieved socket signature is 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

Return Value An error code indicating success or failure.

## Discussion

Discussion Once you have the socket signature, you can open a connection to that socket with CFSocketCreateConnectedToSocketSignature(_:_:_:_:_:_:).

## See Also

### Core Foundation Socket Name Server Utilities Miscellaneous Functions

- [CFSocketCopyRegisteredValue(_:_:_:_:_:)](corefoundation/cfsocketcopyregisteredvalue(_:_:_:_:_:).md)
- [CFSocketGetDefaultNameRegistryPortNumber()](corefoundation/cfsocketgetdefaultnameregistryportnumber().md)
- [CFSocketRegisterSocketSignature(_:_:_:_:)](corefoundation/cfsocketregistersocketsignature(_:_:_:_:).md)
- [CFSocketRegisterValue(_:_:_:_:)](corefoundation/cfsocketregistervalue(_:_:_:_:).md)
- [CFSocketSetDefaultNameRegistryPortNumber(_:)](corefoundation/cfsocketsetdefaultnameregistryportnumber(_:).md)
- [CFSocketUnregister(_:_:_:)](corefoundation/cfsocketunregister(_:_:_:).md)
