<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocol",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network10NWProtocolC"
  },
  "title" : "NWProtocol"
}
-->

# NWProtocol

The abstract superclass used by Network framework protocols and by custom network protocols that you define.

```
class NWProtocol
```

## Topics

### Adding Protocols to Connections

[`class NWProtocolOptions`](/documentation/Network/NWProtocolOptions)

The abstract superclass for configuring the options of a network protocol.

[`class NWProtocolDefinition`](/documentation/Network/NWProtocolDefinition)

The abstract superclass for identifying a network protocol.

### Interacting with Protocols

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

The abstract superclass for specifying metadata about a network protocol.

## Relationships

### Conforms To

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

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

### Inherited By

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

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

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

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

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

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

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

---

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)