[update] Feedback management (to notice viewTerm crash) added (1 byte: 0x10)

This commit is contained in:
xdrm-brackets 2017-05-04 11:03:19 +02:00
parent c868ec22f4
commit f860c8af0a
1 changed files with 13 additions and 0 deletions

View File

@ -261,6 +261,19 @@ void* manageViewTerm(void* THREADABLE_ARGS){
} }
/* [4] Réception feedback
=========================================================*/
/* 1. Réception feedback (0x10) */
len = sizeof(struct sockaddr_in);
sent = recvfrom(arg->socket, buffer, 1, 0, (struct sockaddr*) &clientInfo, &len);
/* 2. Gestion erreur (erreur ou mauvais feedback != 0x10) */
if( sent <= 0 || buffer[0] != 0x10 ){
printf("{udp_vterm}{com}(%d) Unable to recv feedback -> exiting\n", index);
break;
}
/* [4] Timeout /* [4] Timeout
=========================================================*/ =========================================================*/
sleep(PUBL_TIMEOUT); sleep(PUBL_TIMEOUT);