<!--
{
  "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/startSend(_:metadata:handler:)-15tt3",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network0A7ChannelCA2A9WebSocketVRszrlE9startSend_8metadata7handlerySS_SayAA18NWProtocolMetadataCGyXEyySS_SbtYaKXEYaKXEtYaKF"
  },
  "title" : "startSend(_:metadata:handler:)"
}
-->

# startSend(_:metadata:handler:)

Send partial text on a connection.

```
func startSend(_ content: String, @ProtocolMetadataBuilder metadata builder: () -> [NWProtocolMetadata] = {[]}, handler: ((String, Bool) async throws -> Void) async throws -> Void) async throws
```

## Parameters

`content`

A string to send.

`builder`

A builder for specifying metadata about the content to send.

`handler`

A handler that will be invoked immediately, and will be passed a closure
that should be called repeatedly until all text content is sent.
Intermediate invocations of the send closure must be invoked with
`isComplete` set to false. The last call to the send closure must be
invoked with `isComplete` set to true.

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