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

# 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.

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

---

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)