---
title: "send(_:to:dataMode:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatch/send(_:to:datamode:)"
---

# send(_:to:dataMode:)

Transmits data to one or more players connected to the match.

## Declaration

```swift
func send(_ data: Data, to players: [GKPlayer], dataMode mode: GKMatch.SendDataMode) throws
```

## Parameters

- `data`: The bytes to send.
- `players`: The players who receive the data.
- `mode`: The mechanism used to send the data.

## Mentioned in

Exchanging data between players in real-time games

## Discussion

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

## See Also

### Sending data to other players

- [chooseBestHostingPlayer(completionHandler:)](gamekit/gkmatch/choosebesthostingplayer(completionhandler:).md)
- [sendData(toAllPlayers:with:)](gamekit/gkmatch/senddata(toallplayers:with:).md)
- [GKMatch.SendDataMode](gamekit/gkmatch/senddatamode.md)
