Contents

sendIdempotent(_:endOfStream:metadata:)

Send data idempotently on a connection.

Declaration

func sendIdempotent<Value>(_ value: Value, endOfStream: Bool = false, @ProtocolMetadataBuilder metadata builder: () -> [NWProtocolMetadata] = {[]}) where Value : NetworkFixedWidthInteger

Parameters

  • value:

    The byte 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