---
title: "sec_protocol_metadata_get_negotiated_protocol(_:)"
framework: security
role: symbol
role_heading: Function
path: "security/sec_protocol_metadata_get_negotiated_protocol(_:)"
---

# sec_protocol_metadata_get_negotiated_protocol(_:)

## Declaration

```swift
func sec_protocol_metadata_get_negotiated_protocol(_ metadata: sec_protocol_metadata_t) -> UnsafePointer<CChar>?
```

## Parameters

- `metadata`: A sec_protocol_metadata_t instance.

## Return Value

Return Value A NULL-terminated string carrying the negotiated protocol.

## Discussion

Discussion Get the application protocol negotiated, e.g., via the TLS ALPN extension.
