bool valid(HLSender sender){ // if (sender.pid == type) { if (sender.pid == 4) {//write file _total += 1; sender.idx = _total; return true; } return false; }