示例#1
0
int
IPv4Socket::poll_(pollfd* pfd,
                  nfds_t nfd,
                  const boost::optional<bc::milliseconds>& timeout)
{
    const int t = timeout ? timeout->count() : -1;
    return rs_poll(pfd, nfd, t);
}
示例#2
0
int do_poll(struct pollfd *fds, int timeout)
{
	int ret;

	do {
		ret = rs_poll(fds, 1, timeout);
	} while (!ret);

	return ret == 1 ? (fds->revents & (POLLERR | POLLHUP)) : ret;
}
示例#3
0
文件: common.c 项目: Cai900205/test
int do_poll(struct pollfd *fds, int timeout)
{
	int ret;

	do {
		ret = rs_poll(fds, 1, timeout);
	} while (!ret);

	return ret == 1 ? 0 : ret;
}