<!--
{
  "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/NetworkChannel/sendIdempotent(_:endOfStream:metadata:)-4bo5u",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network0A7ChannelCA2A14StreamProtocolRzrlE14sendIdempotent_05endOfC08metadatayqd___SbSayAA18NWProtocolMetadataCGyXEt10Foundation04DataD0Rd__lF"
  },
  "title" : "sendIdempotent(_:endOfStream:metadata:)"
}
-->

# sendIdempotent(_:endOfStream:metadata:)

Send data idempotently on a connection.

```
func sendIdempotent<Content>(_ content: Content, endOfStream: Bool = false, @ProtocolMetadataBuilder metadata builder: () -> [NWProtocolMetadata] = {[]}) where Content : DataProtocol
```

## Parameters

`content`

The bytes to send on the connection.

`endOfStream`

Write-close this stream.

`builder`

A builder for specifying metadata about the content to send.

## Discussion

This may be called before the connection is ready, in which case
the send will be enqueued until the connection is ready to send.

Idempotent content may be sent multiple times when opening up a 0-RTT connection, so there
is no completion block

---

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)