我们使用以下调用设置的非阻塞和异步套接字模式有什么区别。
案例一:int sockfd;// create_sock(sockfd);
// init_sock(sockfd);
fcntl(sockfd, F_SETFL, O_NONBLOCK);
案例二:
int sockfd; // create_sock(sockfd);
// init_sock(sockfd);
整数 = 1;
ioctl(sockfd, FIOASYNC, &on);
案例3:
int sockfd;
// create_sock(sockfd);
// init_sock(sockfd);
整数 = 1; ioctl(sockfd, FIONBIO, &on)
在上述所有情况下,套接字的行为是什么。
谢谢,