---
title: "init(listenerEndpoint:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsxpcconnection/init(listenerendpoint:)"
---

# init(listenerEndpoint:)

Initializes an NSXPCConnection object to connect to an NSXPCListener object in another process, identified by an NSXPCListenerEndpoint object.

## Declaration

```swift
init(listenerEndpoint endpoint: NSXPCListenerEndpoint)
```

## Parameters

- `endpoint`: The desired listener endpoint for the service.

## See Also

### Related Documentation

- [Daemons and Services Programming Guide](apple-archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html.md)

### Creating a connection

- [init(machServiceName:options:)](foundation/nsxpcconnection/init(machservicename:options:).md)
- [NSXPCConnection.Options](foundation/nsxpcconnection/options.md)
- [init(serviceName:)](foundation/nsxpcconnection/init(servicename:).md)
