<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.0.0 - 10.13.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSConnection/connectionWithRegisteredName:host:usingNameServer:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSConnection(cm)connectionWithRegisteredName:host:usingNameServer:"
  },
  "title" : "connectionWithRegisteredName:host:usingNameServer:"
}
-->

# connectionWithRegisteredName:host:usingNameServer:

Returns the `NSConnection` object whose send port links it to the `NSConnection` object registered under a given name with a given server on a given host.

```
+ (instancetype) connectionWithRegisteredName:(NSString *) name host:(NSString *) hostName usingNameServer:(NSPortNameServer *) server;
```

## Parameters

`name`

The connection name.

`hostName`

The host name.

`server`

The name server.

## Return Value

The `NSConnection` object whose send port links it to the `NSConnection` object registered with `server` under `name` on the host named `hostName`.

## Discussion

See [`connectionWithRegisteredName:host:`](/documentation/Foundation/NSConnection/connectionWithRegisteredName:host:) for more information.

---

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)