From: <all...@wi...> - 2004-04-05 17:12:56
|
Hi there: I've been looking at the code relating to non-blocking sockets in TIPC, and it doesn't seem to be quite right to me. Question 1: The ioctl() routine in socket.c is using F_SETFL and O_NONBLOCK to enable the non-blocking capability. Shouldn't it be using FIONBIO? (F_SETFL and O_NONBLOCK are used with fcntl(), not ioctl(), as far as I know.) Question 2: The implementation of ioctl() allows you to make a socket non-blocking, but not to revert it back to blocking. Is there a reason this is not provided? Question 3: Why is there a TIPC-specific socket option called O_NONBLOCK_OPTION? This seems to duplicate the existing standard socket mechanism for making a socket non-blocking. Question 4: I see code that prevents read operations from blocking, but nothing that prevents a write operation from blocking. Is this an oversight? Somehow I get the feeling I'm missing something important here ... Regards, Al |