<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocolFramer/Message",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network16NWProtocolFramerC7MessageC"
  },
  "title" : "NWProtocolFramer.Message"
}
-->

# NWProtocolFramer.Message

A message for a custom protocol, in which you can store arbitrary key-value pairs.

```
class Message
```

## Topics

### Creating Framer Messages

[`init(definition: NWProtocolFramer.Definition)`](/documentation/Network/NWProtocolFramer/Message/init(definition:))

Initializes an empty message for a custom framer definition.

[`init(instance: NWProtocolFramer.Instance)`](/documentation/Network/NWProtocolFramer/Message/init(instance:))

Initializes an empty message from within a framer implementation.

### Accessing Message Metadata

[`subscript(String) -> Any?`](/documentation/Network/NWProtocolFramer/Message/subscript(_:))

Get and set object values in a custom framer message.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

### Inherits From

[`NWProtocolMetadata`](/documentation/Network/NWProtocolMetadata)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)