---
title: "send(_:toPlayers:with:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatch/send(_:toplayers:with:)"
---

# send(_:toPlayers:with:)

Transmits data to a list of connected players.

## Declaration

```swift
func send(_ data: Data, toPlayers playerIDs: [String], with mode: GKMatch.SendDataMode) throws
```

## Parameters

- `data`: The bytes to send.
- `playerIDs`: The identifier strings for the list of players who should receive the data.
- `mode`: The mechanism used to send the data.

## Discussion

Discussion The match queues the data and transmits it when the network becomes available.

## See Also

### Deprecated Methods and Properties

- [chooseBestHostPlayer(completionHandler:)](gamekit/gkmatch/choosebesthostplayer(completionhandler:).md)
- [playerIDs](gamekit/gkmatch/playerids.md)
