全部文本 #103 原始 编辑

Anonymous

公开 text v1 · 不可变
·已发布 2004-04-21 04:09 UTC
渲染后的文本正文
while(1) {
  int maxfd = 0;
  FD_ZERO(&fds);
  tmp = skinnylist_head;
  while(tmp) {
    FD_SET(tmp->fd, &fds);
    if(tmp->fd > maxfd)
      maxfd = tmp->fd;
    tmp = tmp->next;
  }
  res = ast_select(maxfd + 1, &fds, NULL, NULL, NULL);

  if(res > 0) {
    tmp = skinnylist_head;
    while(tmp) {
      if(FD_ISSET(tmp->fd, &fds)) {
        handle_incoming_packet_on(tmp);
      }
    }
  tmp = tmp->next;
}
}