     func invitationToConnectReceived(peer: MCPeerID, handleInvitation: (Bool) -> Void)
     func connectedPeersInSessionChanged(peers: [MCPeerID])
     func connectedToPeer(peer: MCPeerID)
-    func disconnectedFromSession()
+    func connectingToPeer(peer: MCPeerID)
+    func disconnectedFromSession(peer: MCPeerID)
     func handleDataPacket(data: NSData, peerID: MCPeerID)
 }
 

            return
        }
        
        DLog("%@", "invitePeer: \(peerID)")
        foundHosts.append(peerID)
        delegate?.foundHostsChanged(foundHosts)
    }

                // If currently a guest, stop looking for host
                stopSearchingForHosts()
                
                if self.host == peerID {
                    if session.connectedPeers.count >= maxNumPeerInRoom {
                        disconnect()
                        return
                    } else {
                        // Pass to delegate
                        delegate?.connectedToPeer(peerID)
                    }
                }
            } else {
                DLog("%@", "not connected to \(session.hashValue)")
                
                // If self is disconnected from current host
                if self.host == peerID {
                    DLog("%@", "disconnected from host")
                    session.disconnect()
                    delegate?.disconnectedFromSession(peerID)
                    return
                }
            }
            // If self did not disconnect deliberately
            if self.host != nil {
                delegate?.connectedPeersInSessionChanged(session.connectedPeers)
            }
        } else {
            delegate?.connectingToPeer(peerID)
        }
    }
    
