acceptConnection(fromPeer:)
Called by the delegate to accept a connection request received from a remote peer.
Declaration
func acceptConnection(fromPeer peerID: String!) throwsParameters
- peerID:
The string identifying the peer that initiated the connection to the session.
Discussion
When your session acts as a server, client peers can discover your session and attempt to connect to it. When a client attempts to connect to the session, the delegate’s session(_:didReceiveConnectionRequestFromPeer:) method is called to decide whether the peer should be connected. Your application calls this method to accept the request, or denyConnection(fromPeer:) to reject it.