Sets the object that handles data received from other peers connected to the session.
Mac Catalyst 13.0–13.0Deprecated
The object you want the session to call when it receives data from other peers.
Arbitrary data to be passed to each invocation of the handler.
The handler must implement a method with the following signature:
where data contains the bytes received from a remote peer, peer is a string that identifies the peer, session is the session that received the data, and context is the same context that was passed into the original call to setDataReceiveHandler(_:withContext:).
Disconnects a connected peer from all peers connected to the session.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.