Contents

send(_:endOfStream:metadata:)

Send fixed width integer on a connection. This may be called before the connection is ready, in which case the send will be enqueued until the connection is ready to send.

Declaration

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

Parameters

  • value:

    The integer to send on the connection

  • endOfStream:

    Pass true to close the write side of the connection after enqueuing the data to send, meaning that no more data can be sent

  • builder:

    An optional builder for specifying metadata