how to make nonblocking FILE *fp?
hiho@ll
i create a socket connection and use fdopen so i can use fgets fputs .... functions the problem if do fcntl(); on the socket to make it O_NONBLOCK and then make fopen fgets it blocks! is it impossible to do nonblocking operations with fgets? or did i something wrong with my code to set it nonblocking: fcntl(sv[1],F_SETFL,fcntl(sv[1],F_GETFL)|O_NONBLOCK|O_NDELAY); or is there a function other than fcntl i have to use to set the FILE *fp to nonblocking? thx@ll |
damn
forget the post i used the wrong descriptor! NONBLOCKING works for fgets ... functions |
All times are GMT -5. The time now is 03:44 AM. |