buffer size increased
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user