redoing an eric like version

This commit is contained in:
asus
2023-02-24 13:35:49 +01:00
parent 3fe27ea14e
commit 7590b9a25a
18 changed files with 36230 additions and 6 deletions

View File

@@ -166,15 +166,13 @@ int main(int ac, char **av) {
error("Fatal error\n");
while(1) {
print_clients(first_client);
//print_clients(first_client);
maxfd = sockfd;
FD_ZERO(&read_set);
FD_ZERO(&write_set);
FD_SET(sockfd, &read_set);
client = first_client;
while(client) {
write(1, "1", 1);
//printf("id: %i\n", client->id);
FD_SET(client->fd, &read_set);
FD_SET(client->fd, &write_set);
if (client->fd > maxfd)