         guard foundHosts.contains(peerID) else {
             return
         }
-        
+        DLog("%@", "lostPeer: \(peerID)")
         let index = foundHosts.indexOf(peerID)!
         foundHosts.removeAtIndex(index)
         delegate?.foundHostsChanged(foundHosts)

    // This method is async
    public func sendData(data: NSData, mode: MCSessionSendDataMode) -> Bool {
        do {
            DLog("%@", "send data to host: \(data)")
            try session.sendData(data, toPeers: session.connectedPeers, withMode: mode)
        } catch {
            DLog("%@", "send data failed: \(data)")
            return false
        }
        
        return true
    }
    
    // Debug mode
    private func DLog(message: String, _ function: String) {
        if debugMode {

public protocol CoulombNetworkDelegate: class {
    func foundHostsChanged(foundHosts: [MCPeerID])
    func invitationToConnectReceived(peer: MCPeerID, handleInvitation: (Bool) -> Void)
    func connectedPeersInSessionChanged(peers: [MCPeerID])
    func connectedToPeer(peer: MCPeerID)
    func disconnectedFromSession()
    func handleDataPacket(data: NSData, peerID: MCPeerID)
