---
title: "send(_:metadata:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/networkchannel/send(_:metadata:)-5ec48"
---

# send(_:metadata:)

Send a text frame on a WebSocket connection.

## Declaration

```swift
func send(_ content: String, @ProtocolMetadataBuilder metadata builder: () -> [NWProtocolMetadata] = {[]}) async throws
```

## Parameters

- `content`: A string to send.
- `builder`: A builder for specifying metadata about the content to send.

## Discussion

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.
