Lines Matching refs:fd
297 static int pump(APP_CONN *conn, int fd, int events, int timeout) argument
304 pfd.fd = fd;
319 l = read(fd, buf, wspace > sizeof(buf) ? sizeof(buf) : wspace);
344 l2 = write(fd, buf, l);
355 int rc, fd = -1, res = 1; local
392 fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
394 fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
396 if (fd < 0) {
401 rc = connect(fd, result->ai_addr, result->ai_addrlen);
407 rc = fcntl(fd, F_SETFL, O_NONBLOCK);
428 if (pump(conn, fd, get_conn_pending_tx(conn), timeout) != 1) {
443 if (pump(conn, fd, get_conn_pending_rx(conn), timeout) != 1) {