<!--
{
  "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/Coder/init(receiving:sending:using:_:)-7d2qd",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network5CoderV9receiving7sending5using_ACyxq_q0_Gq_m_xmq0_qd__yXEtcAA16DatagramProtocolRd__lufc"
  },
  "title" : "init(receiving:sending:using:_:)"
}
-->

# init(receiving:sending:using:_:)

Create a Coder protocol

```
init<BelowProtocol>(receiving: Receiving.Type, sending: Sending.Type, using: CoderType, @ProtocolStackBuilder<BelowProtocol> _ builder: () -> BelowProtocol) where BelowProtocol : DatagramProtocol
```

## Parameters

`receiving`

The Codable type that will be received.

`sending`

The Codable type that will be sent.

`using`

The NetworkCoder that will be used to encode and decode.

`builder`

The protocol stack below Coder.

---

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)