if (FD_ISSET(sockets[i].fd, readset)) {
do {
len = read(sockets[i].fd, buf, sizeof(buf));
if (len == -1 && (errno == EAGAIN ||
if (len == -1) {
errno == EINTR))
if (errno == EINTR)
continue;
if (errno == EAGAIN) {
usleep(10);
}
break;
} while (1);
if (len <= 0) {