Lines Matching refs:pfds
407 pollfd pfds[3];
408 pfds[0].fd = Socket(true);
409 pfds[0].events = POLLIN;
410 pfds[0].revents = 0;
413 Listen(pfds[0].fd, port);
415 Connect(pfds[0].fd, host, port);
417 pfds[1].fd = tap->getfd();
418 pfds[1].events = POLLIN;
419 pfds[1].revents = 0;
421 pfds[2].fd = 0;
422 pfds[2].events = POLLIN|POLLERR;
423 pfds[2].revents = 0;
425 pollfd *listen_pfd = listening ? &pfds[0] : NULL;
426 pollfd *tap_pfd = &pfds[1];
427 pollfd *client_pfd = listening ? NULL : &pfds[0];
435 int ret = ::poll(pfds, npfds, -1);
447 client_pfd = &pfds[2];