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

# send(_:metadata:)

Send data on a connection.

```
func send<Sending, Receiving, CoderType>(_ content: Sending, @ProtocolMetadataBuilder metadata builder: () -> [NWProtocolMetadata] = {[]}) async throws where ApplicationProtocol == Coder<Sending, Receiving, CoderType>, Sending : Encodable, Receiving : Decodable, CoderType : NetworkCoder
```

## Parameters

`content`

Object to send. The object will be encoded and then sent.

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

---

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)