What is the difference between Non blocking and Asynchronous socket modes that we set using below calls.
Case 1: int sockfd; // create_sock(sockfd);
// init_sock(sockfd);
fcntl(sockfd, F_SETFL, O_NONBLOCK);
Case 2:
int sockfd; // create_sock(sockfd);
// init_sock(sockfd);
int on = 1;
ioctl(sockfd, FIOASYNC, &on);
Case 3:
int sockfd;
// create_sock(sockfd);
// init_sock(sockfd);
int on = 1; ioctl(sockfd, FIONBIO, &on)
What will be the behavior of the socket in all the above cases.
Thanks,