---
title: MessageProtocol
framework: network
role: symbol
role_heading: Protocol
path: network/messageprotocol
---

# MessageProtocol

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

## Declaration

```swift
protocol MessageProtocol : OneToOneProtocol
```

## Topics

### Associated Types

- [ContentType](network/messageprotocol/contenttype.md)
- [LegacyMessage](network/messageprotocol/legacymessage.md)

## Relationships

### Inherits From

- [NetworkProtocolOptions](network/networkprotocoloptions.md)
- [OneToOneProtocol](network/onetooneprotocol.md)

### Inherited By

- [DatagramProtocol](network/datagramprotocol.md)

### Conforming Types

- [Coder](network/coder.md)
- [Framer](network/framer.md)
- [QUICDatagram](network/quicdatagram.md)
- [TLV](network/tlv.md)
- [UDP](network/udp.md)
- [WebSocket](network/websocket.md)
