<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/MessageProtocol",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network15MessageProtocolP"
  },
  "title" : "MessageProtocol"
}
-->

# MessageProtocol

Types that conform to MessageProtocol send and receive messages.
The conforming type is responsible for specifying its message-specific
metadata.

```
protocol MessageProtocol : OneToOneProtocol
```

## Topics

### Associated Types

[`associatedtype ContentType`](/documentation/Network/MessageProtocol/ContentType)

[`associatedtype LegacyMessage`](/documentation/Network/MessageProtocol/LegacyMessage)

## Relationships

### Conforming Types

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

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

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

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

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

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

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

### Inherits From

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

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

### Inherited By

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

---

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)