Contents

send(_:endOfStream:metadata:)

Send data on a connection.

Declaration

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

Parameters

  • content:

    The bytes to send on the connection.

  • endOfStream:

    Write-close this stream.

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.