<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network16NWProtocolFramerC"
  },
  "title" : "NWProtocolFramer"
}
-->

# NWProtocolFramer

A customizable network protocol for defining application message parsers.

```
class NWProtocolFramer
```

## Topics

### Implementing Framer Protocols

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

A protocol to which your classes can conform in order to implement a custom framing protocol.

[`NWProtocolFramer.Instance`](/documentation/Network/NWProtocolFramer/Instance)

An object that represents a single instance of your custom protocol running in a connection.

### Using Framers with Connections

[`NWProtocolFramer.Definition`](/documentation/Network/NWProtocolFramer/Definition)

A custom protocol definition you use to associate messages with protocol options.

[`NWProtocolFramer.Options`](/documentation/Network/NWProtocolFramer/Options)

A container you use to add your custom protocol to a connection’s protocol stack.

[`NWProtocolFramer.Message`](/documentation/Network/NWProtocolFramer/Message)

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



---

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)