if (inet_pton(AF_INET, MCAST_IP, &peeraddr.sin_addr) <= 0) {
printf("wrong group address!\n");
exit(0);
} int interval = 10; int size = 0; struct stat fileinfo; stat(filename,&fileinfo); size = fileinfo.st_size; unsigned long int startt,endt,ms; volatile unsigned long int tmpt; long int sleept; ms = atof(length)*1000; int sendcount = (ms )/ interval; int sendUnitlen = 1316; int sendUnitnum = size/sendUnitlen; float sendNumPer = (sendUnitnum * 1.00)/sendcount; int i = 1,count = 0,totalsend = 0,beginpos = 0,tmppos = 0;