         // pad to 32 bytes!
         let paddedStrData: NSMutableData = ("                                ".data(using: String.Encoding.utf8) as NSData?)?.mutableCopy() as! NSMutableData // that's 32 spaces :)
         paddedStrData.replaceBytes(in: NSMakeRange(0, strData!.length), withBytes: (strData?.bytes)!)
+        self.logDelegate?.didReadWrite("writeName")
         sock.write(paddedStrData as Data, withTimeout: Timeouts.header.rawValue, tag: DataTag.tag_WRITING.rawValue)
         
         // now await auth
+        self.logDelegate?.didReadWrite("readAuth")
         sock.readData(toLength: 1, withTimeout: Timeouts.header.rawValue, tag: DataTag.tag_AUTH.rawValue)
     }
     

            let dataWithoutTerminator = data.subdata(in: Range(range))
            if dataWithoutTerminator == self.keepAliveHeader {
                NSLog("BluepeerObject: got keepalive")
                sock.readData(to: self.headerTerminator, withTimeout: Timeouts.header.rawValue, tag: DataTag.tag_HEADER.rawValue)
            } else {
                var length: UInt = 0
                (dataWithoutTerminator as NSData).getBytes(&length, length: 8)
                NSLog("BluepeerObject: got header, reading %lu bytes...", length)
                sock.readData(toLength: length, withTimeout: Timeouts.body.rawValue, tag: DataTag.tag_BODY.rawValue)
            }
            

            }
            NSLog("BluepeerObject sending data size \(data.count) to \(targetPeers.count) peers")
            for peer in targetPeers {
                self.logDelegate?.didReadWrite("writeSendDataToRole")
                self.sendDataInternal(peer, data: data)
            }
        }
