buffer size increased

This commit is contained in:
asus
2023-02-20 12:40:54 +01:00
parent b8a8ac201e
commit 6fb2d64bdc
3 changed files with 13 additions and 11 deletions

BIN
a.out

Binary file not shown.

View File

@@ -8,7 +8,7 @@
#include <stdio.h>
#define MSGSIZE 1024
#define BUFSIZE MSGSIZE + 20
#define BUFSIZE MSGSIZE + 120000
typedef struct s_client {
int id;
@@ -96,7 +96,7 @@ int main(int ac, char **av) {
if (FD_ISSET(client_fd, &rdset)) {
ret = recv(client_fd, buf, BUFSIZE, 0);
if (ret == 0) {
sprintf(msg, "server: clien %d just left\n", clients[client_fd].id);
sprintf(msg, "server: client %d just left\n", clients[client_fd].id);
broadcast(msg, &fdset, max_fd, server_fd, client_fd);
FD_CLR(client_fd, &fdset);
close(client_fd);
@@ -127,4 +127,3 @@ int main(int ac, char **av) {
return(0);
}

File diff suppressed because one or more lines are too long