cancelConnect(toPeer:)
Cancels a pending request to connect to another iOS device.
Declaration
func cancelConnect(toPeer peerID: String!)Parameters
- peerID:
The string identifying the peer you previously requested to connect to.
Discussion
Your application previously called connect(toPeer:withTimeout:) to create a connection to another iOS device. When your application cancels the connection attempt, both delegates’ session(_:connectionWithPeerFailed:withError:) methods are called.
If your application already connected to the peer, your application should call disconnectFromAllPeers() instead.