---
title: "sendIdempotent(_:endOfStream:metadata:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/networkchannel/sendidempotent(_:endofstream:metadata:)-4bo5u"
---

# sendIdempotent(_:endOfStream:metadata:)

Send data idempotently on a connection.

## Declaration

```swift
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

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
