The mechanism used to transmit data to other players.


enum SendDataMode : Int



case reliable

The data is sent continuously until it is successfully received by the intended recipients or the connection times out. Use this when you need to guarantee delivery and speed is not critical.

case unreliable

The data is sent once and is not sent again if a transmission error occurs. Use this for small packets of data that must arrive quickly to be useful to the recipient.

See Also

Sending Data to Other Players

func chooseBestHostingPlayer(completionHandler: (GKPlayer?) -> Void)

Determines the best player in the game to act as the server for a client-server match.

func send(Data, to: [GKPlayer], dataMode: GKMatch.SendDataMode)

Transmits data to a list of connected players.

func sendData(toAllPlayers: Data, with: GKMatch.SendDataMode)

Transmits data to all players connected to the match.