What "errno==-1" indicates based on sendto fails?Every macro of errno is positive number from "errno.h".
Posted: Sat Aug 05, 2017 6:14 am
Code: Select all
ret=sendto(sock,start,SEND_START_LEN,0,(struct sockaddr *)&toAddr,sizeof(toAddr))
if(ret<0)
{
printf("errno is %d\n",errno);
}
else
{
printf("send success\n");
}
Log is:errno is -1.
So my question is:What "errno==-1" indicates based on sendto fails.