---
title: "metadata(definition:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/networkchannel/metadata(definition:)"
---

# metadata(definition:)

Access connection-wide protocol metadata on the connection. This allows access to state for protocols like TCP and TLS that have long-term state.

## Declaration

```swift
func metadata(definition: NWProtocolDefinition) -> NWProtocolMetadata?
```
