Transmits data to all players connected to the match.
- iOS 4.0+
- macOS 10.8+
- tvOS 9.0+
The bytes to be sent.
The mechanism used to send the data.
If the data could not be queued, on return, this parameter holds an
NSErrorobject describing the error.
YES if the data was successfully queued for transmission;
NO if the match was unable to queue the data.
The match queues the data and transmits it when the network becomes available.
Listing 1 shows how a game might send a position update to the other participants. The method fills a structure with position data, wraps it in an
NSData object, and then calls the match’s
send method. When the method returns without reporting an error, the message has been queued and will be sent when the network is available.