---
title: "connectionWithRegisteredName:host:usingNameServer:"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/nsconnection/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.

## Declaration

```occ
+ (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

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

Discussion See connectionWithRegisteredName:host: for more information.

## See Also

### Getting a Remote Object

- [connectionWithRegisteredName:host:](foundation/nsconnection/connectionwithregisteredname:host:.md)
- [rootProxy](foundation/nsconnection/rootproxy.md)
- [rootProxyForConnectionWithRegisteredName:host:](foundation/nsconnection/rootproxyforconnectionwithregisteredname:host:.md)
- [rootProxyForConnectionWithRegisteredName:host:usingNameServer:](foundation/nsconnection/rootproxyforconnectionwithregisteredname:host:usingnameserver:.md)
- [remoteObjects](foundation/nsconnection/remoteobjects.md)
- [localObjects](foundation/nsconnection/localobjects.md)
