session(_:didReceive:withName:fromPeer:)
Called when a nearby peer opens a byte stream connection to the local peer.
Declaration
func session(_ session: MCSession, didReceive stream: InputStream, withName streamName: String, fromPeer peerID: MCPeerID)Parameters
- session:
The session through which the byte stream was opened.
- stream:
An
NSInputStreamobject that represents the local endpoint for the byte stream. - streamName:
The name of the stream, as provided by the originator.
- peerID:
The peer ID of the originator of the stream.