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.