void select_handle_accept(select_t *sel) { if(FD_ISSET(sel->listenfd_, &sel->rset_)) { int peerfd = accept(sel->listenfd_, NULL, NULL); if(peerfd == -1) ERR_EXIT("accept"); printf("client on\n"); select_add_fd(sel, peerfd); } }
void select_handle_accept(select_t *sel) { if(FD_ISSET(sel->listenfd_, &sel->rset_)) { int peerfd = accept(sel->listenfd_, NULL, NULL); if(peerfd == -1) ERR_EXIT("accept"); select_add_fd(sel, peerfd); --sel->nready_; } }
void select_handle_accept(select_t *sel) { if(FD_ISSET(sel->listenfd, &sel->rset)) { int peerfd = accept(sel->listenfd, NULL, NULL); if(peerfd == -1) { ERR_EXIT("accpet"); } select_add_fd(sel, peerfd); } }