---
title: xpc_connection_handler_t
framework: xpc
role: symbol
role_heading: Type Alias
path: xpc/xpc_connection_handler_t
---

# xpc_connection_handler_t

The type of the function to invoke for a bundled XPC service when there’s a new connection on the service.

## Declaration

```swift
typealias xpc_connection_handler_t = (xpc_connection_t) -> Void
```

## Parameters

- `connection`: A new connection that is equivalent to one received by a listener connection. See the documentation for doc://com.apple.xpc/documentation/XPC/xpc_connection_set_event_handler(_:_:) for the semantics associated with the received connection.

## See Also

### Event handling

- [xpc_connection_set_event_handler(_:_:)](xpc/xpc_connection_set_event_handler(_:_:).md)
- [xpc_handler_t](xpc/xpc_handler_t.md)
