Lines Matching refs:fd
156 static ssize_t read_wincon(int fd, void *buf, size_t count) in read_wincon() argument
162 if(fd == fileno(stdin)) { in read_wincon()
166 return read(fd, buf, count); in read_wincon()
188 static ssize_t write_wincon(int fd, const void *buf, size_t count) in write_wincon() argument
194 if(fd == fileno(stdout)) { in write_wincon()
197 else if(fd == fileno(stderr)) { in write_wincon()
201 return write(fd, buf, count); in write_wincon()
626 int fd; /* provided file descriptor (indexed by nfd) */ member
642 int error, ret, fd; in select_ws() local
693 for(fd = 0; fd < nfds; fd++) { in select_ws()
694 wsasock = (curl_socket_t)fd; in select_ws()
719 data[nfd].fd = fd; in select_ws()
720 if(fd == fileno(stdin)) { in select_ws()
737 else if(fd == fileno(stdout)) { in select_ws()
741 else if(fd == fileno(stderr)) { in select_ws()
760 if(select(fd + 1, &readsock, &writesock, &exceptsock, tv) == 1) { in select_ws()
761 logmsg("[select_ws] socket %d is ready", fd); in select_ws()
819 fd = data[i].fd; in select_ws()
821 wsasock = (curl_socket_t)fd; in select_ws()
827 if(fd == fileno(stdin)) { in select_ws()
832 else if(fd == fileno(stdout) || fd == fileno(stderr)) { in select_ws()
873 for(fd = 0; fd < nfds; fd++) { in select_ws()
874 if(FD_ISSET(fd, readfds)) in select_ws()
875 logmsg("[select_ws] %d is readable", fd); in select_ws()
876 if(FD_ISSET(fd, writefds)) in select_ws()
877 logmsg("[select_ws] %d is writable", fd); in select_ws()
878 if(FD_ISSET(fd, exceptfds)) in select_ws()
879 logmsg("[select_ws] %d is exceptional", fd); in select_ws()