when using connect() in a tcp client program or accept() in a tcp server program many possible exceptions may happen e.g, TCP SYN or TCP SYN/ACK is lost OR some other errors
(BTW, I'm wondering ,if TCP SYN is lots, will connect() retransmit TCP SYN or it just produces an error?)
ususally the source codes are like
if(connect()<0){
...
exit(1);
}
or
if (accept()<)){
...
exit(1);
}
however, if I want to try connect() or accept() again, is it possible or not? like
while(connect()<0){
continue;
}
or
while(accept()<0){
continue;
}
will such a dealing produce unacceptable consequences?
besides, how about send() and recv() thanks!