forked from s444341/Projekt_SIK
Zaktualizuj 'server/server.c'
This commit is contained in:
parent
4c84927fd4
commit
2a468af441
@ -5,12 +5,14 @@
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct client_socket
|
||||
{
|
||||
int socket;
|
||||
struct sockaddr_in accept_adr;
|
||||
|
||||
char name[20] = "";
|
||||
};
|
||||
|
||||
int main(void) {
|
||||
@ -19,7 +21,6 @@ int main(void) {
|
||||
char msg[1024];
|
||||
client_socket client[7];
|
||||
fd_set Clients;
|
||||
struct sockaddr_in nadawca;
|
||||
socklen_t dl = sizeof(struct sockaddr_in);
|
||||
int i;
|
||||
int j;
|
||||
@ -63,6 +64,7 @@ int main(void) {
|
||||
if(ff == 'e') {
|
||||
return 0;
|
||||
}
|
||||
ff = 'a';
|
||||
//Aktualizacja deskryptorów
|
||||
max_fd = 0;
|
||||
FD_ZERO(Clients);
|
||||
|
Loading…
Reference in New Issue
Block a user