add prach

This commit is contained in:
laurent
2019-07-23 18:24:27 +02:00
parent c48609f9af
commit 94831547c7
3 changed files with 344 additions and 141 deletions
+12 -3
View File
@@ -99,11 +99,20 @@ int receiveSubFrame(UDPsock_t *sock, uint64_t expectedTS, void *bufferZone, int
return rcved;
}
int sendSubFrame(UDPsock_t *sock, void *bufferZone) {
commonUDP_t *header=(commonUDP_t *)bufferZone ;
int nbBlocks=header->nbBlocks;
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize) {
commonUDP_t *UDPheader=(commonUDP_t *)bufferZone ;
int nbBlocks=UDPheader->nbBlocks;
int blockId=0;
do {
if (blockId > 0 ) {
commonUDP_t *currentHeader=(commonUDP_t *)bufferZone;
*currentHeader=*UDPheader;
currentHeader->blockID=blockId;
memcpy(commonUDPdata((void *)currentHeader), commonUDPdata(bufferZone), secondHeaderSize);
blockId++;
}
int sz=alignedSize(bufferZone);
// Let's use the first address returned by getaddrinfo()
int ret=sendto(sock->sockHandler, bufferZone, sz, 0,