Lines Matching refs:fd
115 int fd; in CreateConnectionSocket() local
119 if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { in CreateConnectionSocket()
126 if (setsockopt(fd, SOL_SOCKET, SO_LINGER, in CreateConnectionSocket()
128 close(fd); in CreateConnectionSocket()
133 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, in CreateConnectionSocket()
135 close(fd); in CreateConnectionSocket()
140 if (fcntl(fd, F_SETFL, O_NDELAY) < 0) { in CreateConnectionSocket()
142 close(fd); in CreateConnectionSocket()
151 if (connect(fd, (struct sockaddr *) &saddr, in CreateConnectionSocket()
154 return(fd); in CreateConnectionSocket()
157 close(fd); in CreateConnectionSocket()
161 return(fd); in CreateConnectionSocket()