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

# 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

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